Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/gpt CID 1341561: Argument memory leak



details:   https://anonhg.NetBSD.org/src/rev/7d8055e4d79e
branches:  trunk
changeset: 342046:7d8055e4d79e
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Dec 03 21:46:22 2015 +0000

description:
CID 1341561: Argument memory leak

diffstat:

 sbin/gpt/add.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (25 lines):

diff -r 3e8a73f921ce -r 7d8055e4d79e sbin/gpt/add.c
--- a/sbin/gpt/add.c    Thu Dec 03 21:43:25 2015 +0000
+++ b/sbin/gpt/add.c    Thu Dec 03 21:46:22 2015 +0000
@@ -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 @@
                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();
 }



Home | Main Index | Thread Index | Old Index