Module Name: src
Committed By: njoly
Date: Fri Feb 12 14:26:27 UTC 2010
Modified Files:
src/usr.sbin/envstat: envstat.c
Log Message:
Fix double free, when requesting an invalid sensor.
To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 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.75 src/usr.sbin/envstat/envstat.c:1.76
--- src/usr.sbin/envstat/envstat.c:1.75 Fri Feb 12 05:02:40 2010
+++ src/usr.sbin/envstat/envstat.c Fri Feb 12 14:26:27 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: envstat.c,v 1.75 2010/02/12 05:02:40 cnst Exp $ */
+/* $NetBSD: envstat.c,v 1.76 2010/02/12 14:26:27 njoly Exp $ */
/*-
* Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -27,7 +27,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: envstat.c,v 1.75 2010/02/12 05:02:40 cnst Exp $");
+__RCSID("$NetBSD: envstat.c,v 1.76 2010/02/12 14:26:27 njoly Exp $");
#endif /* not lint */
#include <stdio.h>
@@ -436,8 +436,6 @@
}
rval = check_sensors(str);
free(str);
- if (rval)
- free(str);
}
if ((flags & ENVSYS_LFLAG) == 0 && (flags & ENVSYS_DFLAG) == 0)
print_sensors();