summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2011-05-16 02:09:27 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-05-16 02:09:27 +0200
commitffd73488f9eecdb9da40e15f5fdcebf392cb88f8 (patch)
tree238f87c4d27326ab16b2c364905673731d2d434d
parentbd6a298cae998c873c8b5d1bf60646476449642e (diff)
Fix crash on fstab-existing mount
Fix crash when invoking mount with a pair of parameters which already exists in fstab * sutils/fstab.c (fstab_add_mntent): Do not free `mounted_fs' when it is the same as `fs'.
-rw-r--r--sutils/fstab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sutils/fstab.c b/sutils/fstab.c
index 19b03f50..b66e5195 100644
--- a/sutils/fstab.c
+++ b/sutils/fstab.c
@@ -593,7 +593,7 @@ fstab_add_mntent (struct fstab *const fstab, const struct mntent *mntent,
free (fs);
}
- if (!err && mounted_fs)
+ if (!err && mounted_fs && mounted_fs != fs)
/* Get rid of the conflicting entry MOUNTED_FS. */
fs_free (mounted_fs);