mountlist: fix resource leak with MOUNTED_INTERIX_STATVFS
authorAndrew Borodin <aborodin@vmail.ru>
Sun, 6 Oct 2013 14:28:17 +0000 (18:28 +0400)
committerPádraig Brady <P@draigBrady.com>
Mon, 7 Oct 2013 00:04:41 +0000 (01:04 +0100)
* lib/mountlist.c (read_file_system_list): fix leak of directory
streams in case of #ifdef MOUNTED_INTERIX_STATVFS.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
ChangeLog
lib/mountlist.c

index 99357ad..582d6e0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-10-06  Andrew Borodin  <aborodin@vmail.ru>
+
+       mountlist: fix resource leak with MOUNTED_INTERIX_STATVFS
+       * lib/mountlist.c (read_file_system_list): fix leak of directory
+       streams in case of #ifdef MOUNTED_INTERIX_STATVFS.
+
 2013-10-06  Paul Eggert  <eggert@cs.ucla.edu>
 
        tests: improve diagnostic when an assertion fails
 2013-10-06  Paul Eggert  <eggert@cs.ucla.edu>
 
        tests: improve diagnostic when an assertion fails
index 30f4286..b839cd1 100644 (file)
@@ -946,6 +946,7 @@ read_file_system_list (bool need_fs_type)
             mtail = &me->me_next;
           }
       }
             mtail = &me->me_next;
           }
       }
+    closedir (dirp);
   }
 #endif /* MOUNTED_INTERIX_STATVFS */
 
   }
 #endif /* MOUNTED_INTERIX_STATVFS */