NetBSD-Bugs archive

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

bin/42488: Memory leak in bin/pax/sel_sub.c



>Number:         42488
>Category:       bin
>Synopsis:       Memory leak in bin/pax/sel_sub.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 21 07:50:00 +0000 2009
>Originator:     Henning Petersen
>Release:        NetBSD-current
>Organization:
>Environment:
>Description:
Memory leak found with cppcheck.
>How-To-Repeat:

>Fix:
diff -u -r1.21 sel_subs.c
--- bin/pax/sel_subs.c  29 Apr 2007 20:23:34 -0000      1.21
+++ bin/pax/sel_subs.c  21 Dec 2009 07:29:51 -0000
@@ -404,6 +404,7 @@
                        default:
                                tty_warn(1, "Bad option %c with time range %s",
                                    *flgpt, str);
+                               free((char *)pt);       
                                goto out;
                        }
                        ++flgpt;



Home | Main Index | Thread Index | Old Index