Module Name: src
Committed By: christos
Date: Thu Dec 3 21:46:22 UTC 2015
Modified Files:
src/sbin/gpt: add.c
Log Message:
CID 1341561: Argument memory leak
To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sbin/gpt/add.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/gpt/add.c
diff -u src/sbin/gpt/add.c:1.41 src/sbin/gpt/add.c:1.42
--- src/sbin/gpt/add.c:1.41 Thu Dec 3 16:43:25 2015
+++ src/sbin/gpt/add.c Thu Dec 3 16:46:22 2015
@@ -33,7 +33,7 @@
__FBSDID("$FreeBSD: src/sbin/gpt/add.c,v 1.14 2006/06/22 22:05:28 marcel Exp $");
#endif
#ifdef __RCSID
-__RCSID("$NetBSD: add.c,v 1.41 2015/12/03 21:43:25 christos Exp $");
+__RCSID("$NetBSD: add.c,v 1.42 2015/12/03 21:46:22 christos Exp $");
#endif
#include <sys/types.h>
@@ -200,10 +200,9 @@ cmd_add(gpt_t gpt, int argc, char *argv[
goto cleanup;
return add(gpt, alignment, block, sectors, size, entry, name, type);
+usage:
+ return usage();
cleanup:
free(name);
return -1;
-usage:
- free(name);
- return usage();
}