aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-11-19 17:34:57 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-11-19 17:34:57 +0000
commit6a353c81587e3050b7e48fe522b517de9b29e2f3 (patch)
tree8fb17c02c269ee42ec6ef0375db79d91942e5f3c /util-linux
parent83edaf3fd67f486381aaed6a22f5650b6f3e89f7 (diff)
downloadbusybox-6a353c81587e3050b7e48fe522b517de9b29e2f3.tar.gz
mount: if FILE* is NULL, it's not wise to use it.
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/mount.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 4069416d9..027adc568 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -261,14 +261,16 @@ static int mount_it_now(struct mntent *mp, int vfsflags, char *filteropts)
/* If the mount was successful, and we're maintaining an old-style
* mtab file by hand, add the new entry to it now. */
-mtab:
+ mtab:
if (ENABLE_FEATURE_MTAB_SUPPORT && useMtab && !rc && !(vfsflags & MS_REMOUNT)) {
char *fsname;
FILE *mountTable = setmntent(bb_path_mtab_file, "a+");
int i;
- if (!mountTable)
+ if (!mountTable) {
bb_error_msg("no %s",bb_path_mtab_file);
+ goto ret;
+ }
// Add vfs string flags
@@ -300,7 +302,7 @@ mtab:
free(fsname);
}
}
-
+ ret:
return rc;
}