diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2011-05-16 02:09:27 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2011-05-16 02:09:27 +0200 |
commit | ffd73488f9eecdb9da40e15f5fdcebf392cb88f8 (patch) | |
tree | 238f87c4d27326ab16b2c364905673731d2d434d /sutils | |
parent | bd6a298cae998c873c8b5d1bf60646476449642e (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'.
Diffstat (limited to 'sutils')
-rw-r--r-- | sutils/fstab.c | 2 |
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); |