NetBSD Problem Report #50914
From www@NetBSD.org Tue Mar 8 19:42:33 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 9789B7ABD8
for <gnats-bugs@gnats.NetBSD.org>; Tue, 8 Mar 2016 19:42:33 +0000 (UTC)
Message-Id: <20160308194232.829767ACBD@mollari.NetBSD.org>
Date: Tue, 8 Mar 2016 19:42:32 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/usr.bin/fgen/fgen.l:1306]: (error) Memory leak: alias
X-Send-Pr-Version: www-1.0
>Number: 50914
>Category: bin
>Synopsis: src/usr.bin/fgen/fgen.l:1306]: (error) Memory leak: alias
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Mar 08 19:45:00 +0000 2016
>Closed-Date: Wed Mar 09 07:49:50 +0000 2016
>Last-Modified: Wed Mar 09 07:49:50 +0000 2016
>Originator: David Binderman
>Release: cvs dated 20160308
>Organization:
>Environment:
>Description:
Source code is
alias = malloc(sizeof(*alias));
alias->name = strdup(token->text);
token = yylex();
if (token == NULL) {
(void)printf( "EOF in alias definition\n");
return;
}
Looks like some inadequate cleanup inside the if statement to me.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/50914 CVS commit: src/usr.bin/fgen
Date: Tue, 8 Mar 2016 15:13:45 -0500
Module Name: src
Committed By: christos
Date: Tue Mar 8 20:13:45 UTC 2016
Modified Files:
src/usr.bin/fgen: Makefile fgen.l
Log Message:
PR/50914: David Binderman: Fix memory leaks.
While here, fix error handling too.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/fgen/Makefile
cvs rdiff -u -r1.36 -r1.37 src/usr.bin/fgen/fgen.l
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 09 Mar 2016 07:49:50 +0000
State-Changed-Why:
Christos fixed it, thanks!
>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.