fix a memory leak in win32/dirent.c
authorSteve Lhomme <steve.lhomme@free.fr>
Sun, 19 Sep 2004 07:58:13 +0000 (07:58 +0000)
committerSteve Lhomme <steve.lhomme@free.fr>
Sun, 19 Sep 2004 07:58:13 +0000 (07:58 +0000)
Original commit message from CVS:
fix a memory leak in win32/dirent.c

ChangeLog
common
win32/dirent.c

index 7071c3a..813047d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-19  Steve Lhomme  <steve.lhomme@free.fr>
+
+       * win32/dirent.c:
+         fix a memory leak
+
 2004-09-10  Thomas Vander Stichele  <thomas at apestaart dot org>
 
        * configure.ac:
diff --git a/common b/common
index 5ec931d..ded6dc5 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 5ec931d243c53ddda5b2cbb9a2c21ce89747bcb4
+Subproject commit ded6dc5186cb7f8c64cb06a8591b9f787122c6f1
index 74409f6..d2755b5 100644 (file)
@@ -8,6 +8,9 @@
  * Updated by Jeremy Bettis <jeremy@hksys.com>
  * Significantly revised and rewinddir, seekdir and telldir added by Colin
  * Peters <colin@fu.is.saga-u.ac.jp>
+ *
+ * Resource leaks fixed by <steve.lhomme@free.fr>
+ *
  *     
  * $Revision$
  * $Author$
@@ -205,6 +208,9 @@ _tclosedir (_TDIR * dirp)
     rc = _findclose (dirp->dd_handle);
   }
 
+  if (dirp->dd_dir.d_name)
+    free (dirp->dd_dir.d_name);
+
   /* Delete the dir structure. */
   free (dirp);