From 31821efc2976d4d2219e51c6addf8b1222f38c3f Mon Sep 17 00:00:00 2001 From: Petr Uzel Date: Thu, 14 Jun 2012 16:13:01 +0200 Subject: libmount: plug a memory leak in exec_helper() 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 --- libmount/src/context_mount.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libmount/src/context_mount.c') diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c index 69b5bfc13..e00fbe9d0 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; } -- cgit v1.2.3-55-g7522