libblkid: Fix file descriptor leak when checking for a module

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
bitmap-optimize
Theodore Ts'o 2008-10-11 11:07:23 -04:00
parent 79cc336282
commit 6964a17720
1 changed files with 3 additions and 1 deletions

View File

@ -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