From: Petr Uzel <petr.uzel@suse.cz>
To: util-linux <util-linux@vger.kernel.org>
Subject: [PATCH 1/3] libmount: plug a memory leak in exec_helper()
Date: Thu, 14 Jun 2012 16:13:01 +0200 [thread overview]
Message-ID: <1339683183-21804-1-git-send-email-petr.uzel@suse.cz> (raw)
valgrind --leak-check=full ./sys-utils/mount -t cifs //127.0.0.1/users /mnt/smb -o user=root,password=linux
....
==21359== 28 bytes in 1 blocks are definitely lost in loss record 1 of 1
==21359== at 0x4C298B2: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==21359== by 0x415780: __mnt_optstr_append_option (optstr.c:188)
==21359== by 0x415CB5: mnt_optstr_set_option (optstr.c:387)
==21359== by 0x40D778: do_mount (context_mount.c:192)
==21359== by 0x40E6A9: mnt_context_do_mount (context_mount.c:685)
==21359== by 0x40EB7B: mnt_context_mount (context_mount.c:786)
==21359== by 0x4058B0: main (mount.c:918)
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
---
libmount/src/context_mount.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c
index 69b5bfc..e00fbe9 100644
--- a/libmount/src/context_mount.c
+++ b/libmount/src/context_mount.c
@@ -458,6 +458,7 @@ static int exec_helper(struct libmnt_context *cxt)
break;
}
+ free(o);
return rc;
}
--
1.7.7
next reply other threads:[~2012-06-14 14:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-14 14:13 Petr Uzel [this message]
2012-06-14 14:13 ` [PATCH 2/3] libmount: fix read before allocated buffer Petr Uzel
2012-06-15 9:54 ` Karel Zak
2012-06-14 14:13 ` [PATCH 3/3] libmount: fix trivial typos Petr Uzel
2012-06-15 9:54 ` Karel Zak
2012-06-15 9:53 ` [PATCH 1/3] libmount: plug a memory leak in exec_helper() Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1339683183-21804-1-git-send-email-petr.uzel@suse.cz \
--to=petr.uzel@suse.cz \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).