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 c3c13bae4db32f05da031f51a67fed0f8615c041..35866ea763cf2e7d8c13280deee5a1648c69175d 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;