NetBSD Problem Report #44147
From www@NetBSD.org Wed Nov 24 17:14:04 2010
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 8663863BAE5
for <gnats-bugs@gnats.NetBSD.org>; Wed, 24 Nov 2010 17:14:04 +0000 (UTC)
Message-Id: <20101124171404.64AC463B95F@www.NetBSD.org>
Date: Wed, 24 Nov 2010 17:14:04 +0000 (UTC)
From: henning.petersen@t-online.de
Reply-To: henning.petersen@t-online.de
To: gnats-bugs@NetBSD.org
Subject: Missing closedir in at.c .
X-Send-Pr-Version: www-1.0
>Number: 44147
>Category: bin
>Synopsis: Missing closedir in at.c .
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Nov 24 17:15:00 +0000 2010
>Closed-Date: Wed Nov 24 17:47:21 +0000 2010
>Last-Modified: Wed Nov 24 17:47:21 +0000 2010
>Originator: Henning Petersen
>Release: NetBSD-current
>Organization:
>Environment:
>Description:
Memmory leaks in at.
>How-To-Repeat:
>Fix:
diff -u -r1.27 at.c
--- usr.bin/at/at.c 18 Jan 2009 01:02:41 -0000 1.27
+++ usr.bin/at/at.c 20 Nov 2010 09:53:31 -0000
@@ -485,6 +485,7 @@
jobno);
}
PRIV_END;
+ closedir(spool);
}
static void
@@ -565,6 +566,7 @@
}
}
}
+ closedir(spool);
}
/* Global functions */
>Release-Note:
>Audit-Trail:
From: Matthew Mondor <mm_lists@pulsar-zone.net>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/44147: Missing closedir in at.c .
Date: Wed, 24 Nov 2010 12:32:42 -0500
On Wed, 24 Nov 2010 17:15:00 +0000 (UTC)
henning.petersen@t-online.de wrote:
netbsd-5 also lacks the closedir(3) calls, but I don't think a pullup
will be necessary:
list_jobs() and process_jobs() only get called once and the process
then exits, so it doesn't leak resources in this case.
Nevertheless it's probably best to add those matching calls, analysis
software might complain about them...
--
Matt
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/44147 CVS commit: src/usr.bin/at
Date: Wed, 24 Nov 2010 12:40:41 -0500
Module Name: src
Committed By: christos
Date: Wed Nov 24 17:40:41 UTC 2010
Modified Files:
src/usr.bin/at: at.c
Log Message:
PR/44147: Henning Petersen: Add missing closedir calls.
To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.bin/at/at.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: Wed, 24 Nov 2010 17:47:21 +0000
State-Changed-Why:
fixed, 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-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.