Module Name:    src
Committed By:   snj
Date:           Tue Dec 25 21:01:14 UTC 2012

Modified Files:
        src/sbin/sysctl [netbsd-6]: sysctl.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #757):
        sbin/sysctl/sysctl.c: revision 1.149
Add missing free() in error path.


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.140.2.1 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.140 src/sbin/sysctl/sysctl.c:1.140.2.1
--- src/sbin/sysctl/sysctl.c:1.140	Sun Feb 12 20:54:07 2012
+++ src/sbin/sysctl/sysctl.c	Tue Dec 25 21:01:14 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysctl.c,v 1.140 2012/02/12 20:54:07 christos Exp $ */
+/*	$NetBSD: sysctl.c,v 1.140.2.1 2012/12/25 21:01:14 snj 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.140 2012/02/12 20:54:07 christos Exp $");
+__RCSID("$NetBSD: sysctl.c,v 1.140.2.1 2012/12/25 21:01:14 snj Exp $");
 #endif
 #endif /* not lint */
 
@@ -2337,6 +2337,7 @@ kern_drivers(HANDLER_ARGS)
 	rc = prog_sysctl(name, namelen, kd, &sz, NULL, 0);
 	if (rc == -1) {
 		sysctlerror(1);
+		free(kd);
 		return;
 	}
 

Reply via email to