From 096269c44deaab2baf6a8f45b39c657744c0497c Mon Sep 17 00:00:00 2001 From: Petr Uzel Date: Fri, 18 Jun 2010 17:14:53 +0200 Subject: [PATCH] mount: fix memory leak Signed-off-by: Petr Uzel --- mount/mount.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.39.5