This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH] Fix resource leak in getcwd()
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: newlib at sourceware dot org
- Date: Thu, 16 Oct 2014 13:19:19 +0200
- Subject: Re: [PATCH] Fix resource leak in getcwd()
- Authentication-results: sourceware.org; auth=none
- References: <1413455805-13174-1-git-send-email-sebastian dot huber at embedded-brains dot de>
On 16/10/14 12:36, Sebastian Huber wrote:
The fix is similar to the code in the current FreeBSD sources which
fixed this bug in 1997.
newlib/ChangeLog
2014-10-16 Sebastian Huber<sebastian.huber@embedded-brains.de>
* libc/unix/getcwd.c (getcwd): Close directory also in case of
an error.
Sorry, this introduces another resource leak. I will send a new patch soon.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.