From 3bbe672b2601ee324d4a922e255d5396a2c07dc8 Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Fri, 13 Feb 2009 11:59:53 -0700 Subject: [PATCH] mount: segfault when creating mtab and cannot determine fsname Addresses-Debian-Bug: 488312 Signed-off-by: LaMont Jones --- mount/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mount/mount.c b/mount/mount.c index 75d50def..bc254bfd 100644 --- a/mount/mount.c +++ b/mount/mount.c @@ -567,7 +567,7 @@ create_mtab (void) { mnt.mnt_freq = mnt.mnt_passno = 0; free(extra_opts); - if (my_addmntent (mfp, &mnt) == 1) { + if (mnt.mnt_fsname && my_addmntent (mfp, &mnt) == 1) { int errsv = errno; die (EX_FILEIO, _("mount: error writing %s: %s"), _PATH_MOUNTED, strerror (errsv)); -- 2.39.5