diff options
author | Petr Uzel <petr.uzel@suse.cz> | 2010-06-18 17:14:53 +0200 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2010-06-30 12:51:31 +0200 |
commit | 096269c44deaab2baf6a8f45b39c657744c0497c (patch) | |
tree | ccee275d5d30248c43dae8a0c825ab51d71a300e /mount | |
parent | a636313c878894828dcad30b5648efe1b8eb76da (diff) | |
download | util-linux-old-096269c44deaab2baf6a8f45b39c657744c0497c.tar.gz |
mount: fix memory leak
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Diffstat (limited to 'mount')
-rw-r--r-- | mount/mount.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mount/mount.c b/mount/mount.c index c31892b2..b2e445a4 100644 --- a/mount/mount.c +++ b/mount/mount.c @@ -1452,13 +1452,15 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, /* Mount succeeded, report this (if verbose) and write mtab entry. */ if (!(mounttype & MS_PROPAGATION)) { + char *mtab_opts = fix_opts_string (flags & ~MS_NOMTAB, extra_opts, user); update_mtab_entry(loop ? loopfile : spec, node, types ? types : "unknown", - fix_opts_string (flags & ~MS_NOMTAB, extra_opts, user), + mtab_opts, flags, freq, pass); + free (mtab_opts); } block_signals (SIG_UNBLOCK); |