NetBSD Problem Report #50577

From www@NetBSD.org  Tue Dec 22 18:56:19 2015
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 E28817A20F
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 22 Dec 2015 18:56:19 +0000 (UTC)
Message-Id: <20151222185619.14BC47ACB6@mollari.NetBSD.org>
Date: Tue, 22 Dec 2015 18:56:19 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/usr.bin/msgs/msgs.c:804: Resource leak
X-Send-Pr-Version: www-1.0

>Number:         50577
>Category:       bin
>Synopsis:       src/usr.bin/msgs/msgs.c:804: Resource leak
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 22 19:00:00 +0000 2015
>Closed-Date:    Thu Dec 31 11:43:46 +0000 2015
>Last-Modified:  Thu Dec 31 11:43:46 +0000 2015
>Originator:     David Binderman
>Release:        cvs dated 20151222
>Organization:
>Environment:
>Description:
[src/usr.bin/msgs/msgs.c:804]: (error) Resource leak: cpfrom

        if (!cpto) {
            perror(fname);
            mailing = NO;
            fseek(newmsg, oldpos, 0);
            ask(prompt);
            return;
        }

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50577 CVS commit: src/usr.bin/msgs
Date: Thu, 31 Dec 2015 01:16:47 +0000

 Module Name:	src
 Committed By:	dholland
 Date:		Thu Dec 31 01:16:47 UTC 2015

 Modified Files:
 	src/usr.bin/msgs: msgs.c

 Log Message:
 Avoid leaking a file handle on error opening the next file. From
 David Binderman in PR 50577.


 To generate a diff of this commit:
 cvs rdiff -u -r1.23 -r1.24 src/usr.bin/msgs/msgs.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: dholland@NetBSD.org
State-Changed-When: Thu, 31 Dec 2015 11:43:46 +0000
State-Changed-Why:
fixed, thanks


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.