aboutsummaryrefslogtreecommitdiffstats
path: root/lib/blkid
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2008-10-11 11:07:23 -0400
committerTheodore Ts'o <tytso@mit.edu>2008-10-12 23:12:22 -0400
commit6964a17720ca88acd2075b57dde9c381f093e492 (patch)
tree5d8eca9ed25b16775407857868798b5a70608855 /lib/blkid
parent79cc33628256e817610e921ddf600f72e4f879e1 (diff)
downloadandroid_external_e2fsprogs-6964a17720ca88acd2075b57dde9c381f093e492.tar.gz
android_external_e2fsprogs-6964a17720ca88acd2075b57dde9c381f093e492.tar.bz2
android_external_e2fsprogs-6964a17720ca88acd2075b57dde9c381f093e492.zip
libblkid: Fix file descriptor leak when checking for a module
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'lib/blkid')
-rw-r--r--lib/blkid/probe.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/blkid/probe.c b/lib/blkid/probe.c
index 71b00f4d..a55bceb0 100644
--- a/lib/blkid/probe.c
+++ b/lib/blkid/probe.c
@@ -233,8 +233,10 @@ static int check_for_modules(const char *fs_name)
if (!strcmp(t, ".ko"))
*t = 0;
}
- if (!strcmp(cp, fs_name))
+ if (!strcmp(cp, fs_name)) {
+ fclose(f);
return (1);
+ }
}
fclose(f);
#endif