From ffd73488f9eecdb9da40e15f5fdcebf392cb88f8 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 16 May 2011 02:09:27 +0200 Subject: 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'. --- sutils/fstab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sutils') 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); -- cgit v1.2.3