Hi!

There is a resource leak in the read_file_system_list() function. Attached patch
fixes that.

-- 
Regards,
Andrew
From fbf9bb5571b38f8914badfc18b122c010cb9747b Mon Sep 17 00:00:00 2001
From: Andrew Borodin <aboro...@vmail.ru>
Date: Sun, 6 Oct 2013 18:28:17 +0400
Subject: [PATCH] mountlist: fix resource leak.

* lib/mountlist.c (read_file_system_list): fix leak of directory streams
in case of #ifdef MOUNTED_INTERIX_STATVFS.

Signed-off-by: Andrew Borodin <aboro...@vmail.ru>
---
 lib/mountlist.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/mountlist.c b/lib/mountlist.c
index 30f4286..b839cd1 100644
--- a/lib/mountlist.c
+++ b/lib/mountlist.c
@@ -946,6 +946,7 @@ read_file_system_list (bool need_fs_type)
             mtail = &me->me_next;
           }
       }
+    closedir (dirp);
   }
 #endif /* MOUNTED_INTERIX_STATVFS */
 
-- 
1.8.1.1

Reply via email to