lib: fix file descriptor leak in is_mounted()

Remove an extraneous fopen() that leaks memory and a file descriptor.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
Theodore Ts'o 2009-10-03 12:50:06 -04:00
parent 741064af10
commit fdf08588af
1 changed files with 0 additions and 3 deletions

View File

@ -70,9 +70,6 @@ static int check_mntent_file(const char *mtab_file, const char *file,
char buf[1024], *device = 0, *mnt_dir = 0, *cp;
*mount_flags = 0;
if ((f = fopen(mtab_file, "r")) == NULL)
return errno;
if ((f = setmntent (mtab_file, "r")) == NULL)
return errno;
if (stat(file, &st_buf) == 0) {