diff options
-rw-r--r-- | sbin/disklabel/editor.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index 7a58848deff..3a5eb677611 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.279 2014/02/15 00:10:17 krw Exp $ */ +/* $OpenBSD: editor.c,v 1.280 2014/02/15 02:39:38 krw Exp $ */ /* * Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com> @@ -1902,6 +1902,9 @@ mpfree(char **mp) { int part; + if (mp == NULL) + return; + for (part == 0; part < MAXPARTITIONS; part++) { free(mp[part]); mp[part] = NULL; |