diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-08-25 10:44:47 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-08-25 10:44:47 +0000 |
commit | 04c82a9ba057783e291f64049508ae5810c9f951 (patch) | |
tree | a73a45151796c99b417c72bba254e7a4ce71d1b2 | |
parent | 2f1832898fe689e6a774b84a037b1e93400b6038 (diff) | |
download | newlib-04c82a9ba057783e291f64049508ae5810c9f951.zip newlib-04c82a9ba057783e291f64049508ae5810c9f951.tar.gz newlib-04c82a9ba057783e291f64049508ae5810c9f951.tar.bz2 |
* libc/posix/opendir.c (opendir): Fix potential memory leak.
-rw-r--r-- | newlib/ChangeLog | 4 | ||||
-rw-r--r-- | newlib/libc/posix/opendir.c | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 78732cf..00cc126 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,7 @@ +2010-08-25 Sebastian Huber <sebastian.huber@embedded-brains.de> + + * libc/posix/opendir.c (opendir): Fix potential memory leak. + 2010-08-10 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> * libc/include/sys/dir.h: New BSD-compatibility header. diff --git a/newlib/libc/posix/opendir.c b/newlib/libc/posix/opendir.c index c9a97db..ca764e1 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; } |