Date: Mon, 21 Dec 2009 12:26:40 GMT From: Henning Petersen <henning.petersen@t-online.de> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/141835: Memory leak in bin/pax/sel_subs.c Message-ID: <200912211226.nBLCQeMY016112@www.freebsd.org> Resent-Message-ID: <200912211230.nBLCU7bZ082422@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 141835 >Category: bin >Synopsis: Memory leak in bin/pax/sel_subs.c >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Dec 21 12:30:06 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Henning Petersen >Release: Freebsd-current >Organization: >Environment: >Description: Memory leak found with cppcheck. >How-To-Repeat: >Fix: diff -u -r1.21 sel_subs.c --- src/bin/pax/sel_subs.c 25 May 2007 17:53:38 -0000 1.21 +++ src/bin/pax/sel_subs.c 21 Dec 2009 08:52:55 -0000 @@ -396,6 +396,7 @@ default: paxwarn(1, "Bad option %c with time range %s", *flgpt, str); + free(pt); goto out; } ++flgpt; Patch attached with submission follows: Index: src/bin/pax/sel_subs.c =================================================================== RCS file: /usr/ncvs/src/bin/pax/sel_subs.c,v retrieving revision 1.21 diff -u -r1.21 sel_subs.c --- src/bin/pax/sel_subs.c 25 May 2007 17:53:38 -0000 1.21 +++ src/bin/pax/sel_subs.c 21 Dec 2009 08:52:55 -0000 @@ -396,6 +396,7 @@ default: paxwarn(1, "Bad option %c with time range %s", *flgpt, str); + free(pt); goto out; } ++flgpt; >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912211226.nBLCQeMY016112>