NetBSD Problem Report #50711
From www@NetBSD.org Tue Jan 26 08:59:44 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.NetBSD.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id AB8657ABC4
for <gnats-bugs@gnats.NetBSD.org>; Tue, 26 Jan 2016 08:59:44 +0000 (UTC)
Message-Id: <20160126085943.CC9017ACAC@mollari.NetBSD.org>
Date: Tue, 26 Jan 2016 08:59:43 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/lib/libcompat/regexp/regexp.c:250]: (error) Memory leak: r
X-Send-Pr-Version: www-1.0
>Number: 50711
>Category: lib
>Synopsis: src/lib/libcompat/regexp/regexp.c:250]: (error) Memory leak: r
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 26 09:00:00 +0000 2016
>Closed-Date: Tue Jan 26 16:09:25 +0000 2016
>Last-Modified: Tue Jan 26 16:10:00 +0000 2016
>Originator: David Binderman
>Release: cvs dated 20160125
>Organization:
>Environment:
>Description:
Source code is
if (reg(0, &flags) == NULL)
return(NULL);
Something like
if (reg(0, &flags) == NULL)
{
free(r);
return(NULL);
}
might be a suitable replacement.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Tue, 26 Jan 2016 16:09:25 +0000
State-Changed-Why:
Christos fixed it, thanks!
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/50711 CVS commit: src/lib/libcompat/regexp
Date: Tue, 26 Jan 2016 11:05:18 -0500
Module Name: src
Committed By: christos
Date: Tue Jan 26 16:05:18 UTC 2016
Modified Files:
src/lib/libcompat/regexp: regexp.c
Log Message:
PR/50711: David Binderman: Fix memory leak on error
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/libcompat/regexp/regexp.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-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.