diff options
author | Mark Whitley | 2001-02-26 17:45:58 +0000 |
---|---|---|
committer | Mark Whitley | 2001-02-26 17:45:58 +0000 |
commit | e677dfedd1183da404e781a48607ad7a8a7e6d87 (patch) | |
tree | c2fd1ce42fea21621cafbf3be475a5d8c0717e44 | |
parent | d11578f9167a5bc10cf77544cc1d64965d3f8f2b (diff) | |
download | busybox-e677dfedd1183da404e781a48607ad7a8a7e6d87.zip busybox-e677dfedd1183da404e781a48607ad7a8a7e6d87.tar.gz |
Applied patch from Magnus Damm <damm@opensource.se> to fix a 'inner scope var
masking outer scope var with same name' bug that was preventing the loopback
device from being unmounted if mount() fails.
-rw-r--r-- | mount.c | 3 | ||||
-rw-r--r-- | util-linux/mount.c | 3 |
2 files changed, 4 insertions, 2 deletions
@@ -128,7 +128,8 @@ do_mount(char *specialfile, char *dir, char *filesystemtype, #if defined BB_FEATURE_MOUNT_LOOP if (use_loop==TRUE) { int loro = flags & MS_RDONLY; - char *lofile = specialfile; + + lofile = specialfile; specialfile = find_unused_loop_device(); if (specialfile == NULL) { diff --git a/util-linux/mount.c b/util-linux/mount.c index 7b0bf3e..551695b 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c @@ -128,7 +128,8 @@ do_mount(char *specialfile, char *dir, char *filesystemtype, #if defined BB_FEATURE_MOUNT_LOOP if (use_loop==TRUE) { int loro = flags & MS_RDONLY; - char *lofile = specialfile; + + lofile = specialfile; specialfile = find_unused_loop_device(); if (specialfile == NULL) { |