aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2005-08-14 19:26:14 +0000
committerRob Landley <rob@landley.net>2005-08-14 19:26:14 +0000
commitde5fd23f25653b0bb240e7c3a32abcc9bf2997d2 (patch)
tree74738eb7c8a2a39a0b0d431337cdaa2fb5e582a7
parent23246f39ed19b6951c48396e239c11cef073f142 (diff)
downloadbusybox-de5fd23f25653b0bb240e7c3a32abcc9bf2997d2.tar.gz
If we goto singlemount, do _not_ try to continue through the loop we jumped
into. (That means "mount -t ext2 /dev/thingy thingy" would segfault if it failed instead of giving us an error message.)
-rw-r--r--util-linux/mount.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c
index c3c13bae4..35866ea76 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -342,7 +342,7 @@ mount_it_now:
flags|=MS_RDONLY;
}
}
- if(!rc) break;
+ if(!rc || !f) break;
}
if(f) fclose(f);
if(!f || !rc) break;