Simple fixes accumulated after 1.3.0.
[oweals/busybox.git] / util-linux / mount.c
index f8ae1df190e981cbea2f6310c48448bd629ad572..0fcd8e561ed35815cd33c42d4f052b0450e82cce 100644 (file)
@@ -1693,10 +1693,13 @@ int mount_main(int argc, char **argv)
 
                        // Mount this thing.
 
+                       // NFS mounts want this to be xrealloc-able
+                       mtcur->mnt_opts = xstrdup(mtcur->mnt_opts);
                        if (singlemount(mtcur, 1)) {
                                /* Count number of failed mounts */
                                rc++;
                        }
+                       free(mtcur->mnt_opts);
                }
        }
        if (ENABLE_FEATURE_CLEAN_UP) endmntent(fstab);