diff options
Diffstat (limited to 'util-linux/mount.c')
-rw-r--r-- | util-linux/mount.c | 8 |
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) | |||
261 | 261 | ||
262 | /* If the mount was successful, and we're maintaining an old-style | 262 | /* If the mount was successful, and we're maintaining an old-style |
263 | * mtab file by hand, add the new entry to it now. */ | 263 | * mtab file by hand, add the new entry to it now. */ |
264 | mtab: | 264 | mtab: |
265 | if (ENABLE_FEATURE_MTAB_SUPPORT && useMtab && !rc && !(vfsflags & MS_REMOUNT)) { | 265 | if (ENABLE_FEATURE_MTAB_SUPPORT && useMtab && !rc && !(vfsflags & MS_REMOUNT)) { |
266 | char *fsname; | 266 | char *fsname; |
267 | FILE *mountTable = setmntent(bb_path_mtab_file, "a+"); | 267 | FILE *mountTable = setmntent(bb_path_mtab_file, "a+"); |
268 | int i; | 268 | int i; |
269 | 269 | ||
270 | if (!mountTable) | 270 | if (!mountTable) { |
271 | bb_error_msg("no %s",bb_path_mtab_file); | 271 | bb_error_msg("no %s",bb_path_mtab_file); |
272 | goto ret; | ||
273 | } | ||
272 | 274 | ||
273 | // Add vfs string flags | 275 | // Add vfs string flags |
274 | 276 | ||
@@ -300,7 +302,7 @@ mtab: | |||
300 | free(fsname); | 302 | free(fsname); |
301 | } | 303 | } |
302 | } | 304 | } |
303 | 305 | ret: | |
304 | return rc; | 306 | return rc; |
305 | } | 307 | } |
306 | 308 | ||