NetBSD Problem Report #42488
From www@NetBSD.org Mon Dec 21 07:49:05 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 3E20163C501
for <gnats-bugs@gnats.NetBSD.org>; Mon, 21 Dec 2009 07:49:05 +0000 (UTC)
Message-Id: <20091221074905.0A68A63C4ED@www.NetBSD.org>
Date: Mon, 21 Dec 2009 07:49:05 +0000 (UTC)
From: henning.petersen@t-online.de
Reply-To: henning.petersen@t-online.de
To: gnats-bugs@NetBSD.org
Subject: Memory leak in bin/pax/sel_sub.c
X-Send-Pr-Version: www-1.0
>Number: 42488
>Category: bin
>Synopsis: Memory leak in bin/pax/sel_sub.c
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Dec 21 07:50:00 +0000 2009
>Closed-Date: Mon Dec 21 09:18:21 +0000 2009
>Last-Modified: Mon Dec 21 09:20:02 +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;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Mon, 21 Dec 2009 09:18:21 +0000
State-Changed-Why:
Committed with an additional void cast like in the other places in this
function. Thanks!
From: Thomas Klausner <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/42488 CVS commit: src/bin/pax
Date: Mon, 21 Dec 2009 09:17:37 +0000
Module Name: src
Committed By: wiz
Date: Mon Dec 21 09:17:37 UTC 2009
Modified Files:
src/bin/pax: sel_subs.c
Log Message:
Free pt in another error case.
Found by Henning Petersen using cppcheck, in PR 42488.
To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/bin/pax/sel_subs.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.