From 98171ec274fdcd518baf812ad0dd8933d2eee8ee Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 6 Oct 2013 18:28:17 +0400 Subject: [PATCH] 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 --- ChangeLog | 6 ++++++ lib/mountlist.c | 1 + 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 99357ad50..582d6e08c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-10-06 Andrew Borodin + + 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 tests: improve diagnostic when an assertion fails diff --git a/lib/mountlist.c b/lib/mountlist.c index 30f428613..b839cd17f 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 */ -- 2.11.0