changeset 37193:034ed2a85037

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. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
author Andrew Borodin <aborodin@vmail.ru>
date Sun, 06 Oct 2013 18:28:17 +0400
parents c470b35aad12
children 53763a2be60d
files ChangeLog lib/mountlist.c
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Oct 06 14:10:29 2013 -0700
+++ b/ChangeLog	Sun Oct 06 18:28:17 2013 +0400
@@ -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
--- a/lib/mountlist.c	Sun Oct 06 14:10:29 2013 -0700
+++ b/lib/mountlist.c	Sun Oct 06 18:28:17 2013 +0400
@@ -946,6 +946,7 @@
             mtail = &me->me_next;
           }
       }
+    closedir (dirp);
   }
 #endif /* MOUNTED_INTERIX_STATVFS */