From: Petr Uzel Date: Fri, 18 Jun 2010 15:14:53 +0000 (+0200) Subject: mount: fix memory leak X-Git-Tag: v2.18~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=096269c44deaab2baf6a8f45b39c657744c0497c;p=thirdparty%2Futil-linux.git mount: fix memory leak Signed-off-by: Petr Uzel --- diff --git a/mount/mount.c b/mount/mount.c index c31892b2d0..b2e445a45a 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);