Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/sysctl Add missing free() in error path.
details: https://anonhg.NetBSD.org/src/rev/711db691f90a
branches: trunk
changeset: 783280:711db691f90a
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Thu Dec 13 05:27:01 2012 +0000
description:
Add missing free() in error path.
diffstat:
sbin/sysctl/sysctl.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 0e4514491963 -r 711db691f90a sbin/sysctl/sysctl.c
--- a/sbin/sysctl/sysctl.c Thu Dec 13 02:12:15 2012 +0000
+++ b/sbin/sysctl/sysctl.c Thu Dec 13 05:27:01 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysctl.c,v 1.148 2012/12/07 02:27:29 christos Exp $ */
+/* $NetBSD: sysctl.c,v 1.149 2012/12/13 05:27:01 msaitoh Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
#if 0
static char sccsid[] = "@(#)sysctl.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: sysctl.c,v 1.148 2012/12/07 02:27:29 christos Exp $");
+__RCSID("$NetBSD: sysctl.c,v 1.149 2012/12/13 05:27:01 msaitoh Exp $");
#endif
#endif /* not lint */
@@ -2358,6 +2358,7 @@
rc = prog_sysctl(name, namelen, kd, &sz, NULL, 0);
if (rc == -1) {
sysctlerror(1);
+ free(kd);
return;
}
Home |
Main Index |
Thread Index |
Old Index