From de511a88b1192f2c2c1db52a2fc232a4db4d4faf Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 21 Dec 2010 09:54:52 +0100 Subject: [PATCH] libmount: don't use NULL pointer in mntenv Signed-off-by: Karel Zak --- shlibs/mount/src/fs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/shlibs/mount/src/fs.c b/shlibs/mount/src/fs.c index 61bad7fd..94c35355 100644 --- a/shlibs/mount/src/fs.c +++ b/shlibs/mount/src/fs.c @@ -1364,6 +1364,11 @@ int mnt_fs_to_mntent(mnt_fs *fs, struct mntent **mnt) m->mnt_freq = mnt_fs_get_freq(fs); m->mnt_passno = mnt_fs_get_passno(fs); + if (!m->mnt_fsname) { + m->mnt_fsname = strdup("none"); + if (!m->mnt_fsname) + goto err; + } *mnt = m; return 0; -- 2.39.5