From owner-freebsd-bugs@FreeBSD.ORG Mon Dec 21 12:30:07 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E3FA1065670 for ; Mon, 21 Dec 2009 12:30:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 323AD8FC13 for ; Mon, 21 Dec 2009 12:30:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nBLCU7fL082433 for ; Mon, 21 Dec 2009 12:30:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nBLCU7bZ082422; Mon, 21 Dec 2009 12:30:07 GMT (envelope-from gnats) Resent-Date: Mon, 21 Dec 2009 12:30:07 GMT Resent-Message-Id: <200912211230.nBLCU7bZ082422@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Henning Petersen Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEEF4106566B for ; Mon, 21 Dec 2009 12:26:40 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id DE89F8FC16 for ; Mon, 21 Dec 2009 12:26:40 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id nBLCQeo4016113 for ; Mon, 21 Dec 2009 12:26:40 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id nBLCQeMY016112; Mon, 21 Dec 2009 12:26:40 GMT (envelope-from nobody) Message-Id: <200912211226.nBLCQeMY016112@www.freebsd.org> Date: Mon, 21 Dec 2009 12:26:40 GMT From: Henning Petersen To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/141835: Memory leak in bin/pax/sel_subs.c X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Dec 2009 12:30:07 -0000 >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: