NetBSD Problem Report #50712
From www@NetBSD.org Tue Jan 26 09:16:21 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 D2B8F7ABE8
for <gnats-bugs@gnats.NetBSD.org>; Tue, 26 Jan 2016 09:16:20 +0000 (UTC)
Message-Id: <20160126091620.07C297ACAC@mollari.NetBSD.org>
Date: Tue, 26 Jan 2016 09:16:20 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/usr.bin/showmount/showmount.c: many memory leaks ?
X-Send-Pr-Version: www-1.0
>Number: 50712
>Category: bin
>Synopsis: src/usr.bin/showmount/showmount.c: many memory leaks ?
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 26 09:20:00 +0000 2016
>Closed-Date: Tue Jan 26 16:34:03 +0000 2016
>Last-Modified: Tue Jan 26 16:34:03 +0000 2016
>Originator: David Binderman
>Release: cvs dated 20160125
>Organization:
>Environment:
>Description:
1.
src/usr.bin/showmount/showmount.c:335]: (error) Memory leak: ep
if (!xdr_string(xdrsp, &strp, RPCMNT_PATHLEN))
return (0);
2.
src/usr.bin/showmount/showmount.c:344]: (error) Memory leak: gp
if (!xdr_string(xdrsp, &strp, RPCMNT_NAMELEN))
return (0);
However, a close examination of the function xdr_exports shows
many places where a return is made in the middle of the function,
without any calls to free.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/50712 CVS commit: src/usr.bin/showmount
Date: Tue, 26 Jan 2016 11:23:27 -0500
Module Name: src
Committed By: christos
Date: Tue Jan 26 16:23:27 UTC 2016
Modified Files:
src/usr.bin/showmount: showmount.c
Log Message:
PR/50712: David Binderman: Fix memory leaks.
To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/showmount/showmount.c
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: Tue, 26 Jan 2016 16:34:03 +0000
State-Changed-Why:
Fixed by christos, 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.