NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/47316: Memory leak in envstat with config file.



>Number:         47316
>Category:       bin
>Synopsis:       Memory leak in envstat with config file.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 13 12:20:01 +0000 2012
>Originator:     Henning Petersen
>Release:        NetBSD-current
>Organization:
>Environment:
>Description:
Memory leak if config file is used.
>How-To-Repeat:

>Fix:
diff -u -p -r1.91 envstat.c
--- usr.sbin/envstat/envstat.c  11 May 2012 18:41:12 -0000      1.91
+++ usr.sbin/envstat/envstat.c  6 Dec 2012 10:58:57 -0000
@@ -264,6 +264,7 @@ int main(int argc, char **argv)
 
                rval = send_dictionary(cf);
                (void)fclose(cf);
+               free(configfile);
 
        /* Show sensors with interval */
        } else if (interval) {



Home | Main Index | Thread Index | Old Index