From: Petr Uzel Date: Fri, 18 Jun 2010 15:14:53 +0000 (+0200) Subject: mount: fix memory leak X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=096269c44deaab2baf6a8f45b39c657744c0497c;p=util-linux mount: fix memory leak Signed-off-by: Petr Uzel --- 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);