Module Name:    src
Committed By:   christos
Date:           Thu Dec 13 19:31:25 UTC 2012

Modified Files:
        src/usr.sbin/envstat: envstat.c

Log Message:
PR/47316: Henning Petersen: Memory leak in envstat with config file.


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/usr.sbin/envstat/envstat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/envstat/envstat.c
diff -u src/usr.sbin/envstat/envstat.c:1.91 src/usr.sbin/envstat/envstat.c:1.92
--- src/usr.sbin/envstat/envstat.c:1.91	Fri May 11 14:41:12 2012
+++ src/usr.sbin/envstat/envstat.c	Thu Dec 13 14:31:25 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: envstat.c,v 1.91 2012/05/11 18:41:12 njoly Exp $ */
+/* $NetBSD: envstat.c,v 1.92 2012/12/13 19:31:25 christos Exp $ */
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -27,7 +27,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: envstat.c,v 1.91 2012/05/11 18:41:12 njoly Exp $");
+__RCSID("$NetBSD: envstat.c,v 1.92 2012/12/13 19:31:25 christos Exp $");
 #endif /* not lint */
 
 #include <stdio.h>
@@ -261,6 +261,7 @@ int main(int argc, char **argv)
 			syslog(LOG_ERR, "fopen failed: %s", strerror(errno));
 			errx(EXIT_FAILURE, "%s", strerror(errno));
 		}
+		free(configfile);
 
 		rval = send_dictionary(cf);
 		(void)fclose(cf);

Reply via email to