Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-08-25 14:44:47 +0400
committerCorinna Vinschen <corinna@vinschen.de>2010-08-25 14:44:47 +0400
commit04c82a9ba057783e291f64049508ae5810c9f951 (patch)
treea73a45151796c99b417c72bba254e7a4ce71d1b2 /newlib/libc/posix
parent2f1832898fe689e6a774b84a037b1e93400b6038 (diff)
* libc/posix/opendir.c (opendir): Fix potential memory leak.
Diffstat (limited to 'newlib/libc/posix')
-rw-r--r--newlib/libc/posix/opendir.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/newlib/libc/posix/opendir.c b/newlib/libc/posix/opendir.c
index c9a97dbf3..ca764e156 100644
--- a/newlib/libc/posix/opendir.c
+++ b/newlib/libc/posix/opendir.c
@@ -74,6 +74,7 @@ _DEFUN(opendir, (name),
dirp->dd_len = 512;
if (dirp->dd_buf == NULL) {
+ free (dirp);
close (fd);
return NULL;
}