Module Name: src
Committed By: bouyer
Date: Sun Jan 13 16:35:24 UTC 2013
Modified Files:
src/sbin/sysctl [netbsd-5]: sysctl.c
Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1832):
sbin/sysctl/sysctl.c: revision 1.149 via patch
Add missing free() in error path.
To generate a diff of this commit:
cvs rdiff -u -r1.124.2.1 -r1.124.2.2 src/sbin/sysctl/sysctl.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/sysctl/sysctl.c
diff -u src/sbin/sysctl/sysctl.c:1.124.2.1 src/sbin/sysctl/sysctl.c:1.124.2.2
--- src/sbin/sysctl/sysctl.c:1.124.2.1 Wed Apr 1 21:37:02 2009
+++ src/sbin/sysctl/sysctl.c Sun Jan 13 16:35:24 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: sysctl.c,v 1.124.2.1 2009/04/01 21:37:02 snj Exp $ */
+/* $NetBSD: sysctl.c,v 1.124.2.2 2013/01/13 16:35:24 bouyer Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@ __COPYRIGHT("@(#) Copyright (c) 1993\
#if 0
static char sccsid[] = "@(#)sysctl.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: sysctl.c,v 1.124.2.1 2009/04/01 21:37:02 snj Exp $");
+__RCSID("$NetBSD: sysctl.c,v 1.124.2.2 2013/01/13 16:35:24 bouyer Exp $");
#endif
#endif /* not lint */
@@ -2246,6 +2246,7 @@ kern_drivers(HANDLER_ARGS)
rc = sysctl(name, namelen, kd, &sz, NULL, 0);
if (rc == -1) {
sysctlerror(1);
+ free(kd);
return;
}