If we goto singlemount, do _not_ try to continue through the loop we jumped
authorRob Landley <rob@landley.net>
Sun, 14 Aug 2005 19:26:14 +0000 (19:26 -0000)
committerRob Landley <rob@landley.net>
Sun, 14 Aug 2005 19:26:14 +0000 (19:26 -0000)
into.  (That means "mount -t ext2 /dev/thingy thingy" would segfault if
it failed instead of giving us an error message.)

util-linux/mount.c

index c3c13ba..35866ea 100644 (file)
@@ -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;