summaryrefslogtreecommitdiffstats
path: root/libmount/src/context_mount.c
diff options
context:
space:
mode:
authorKarel Zak2015-01-29 10:58:55 +0100
committerKarel Zak2015-01-29 10:58:55 +0100
commit7bc2fd3d2368c88c26ddc43e5f6dd3f9ac1c488d (patch)
tree26bf9d32793c871210fbe4a96e5fa2cc79902dfa /libmount/src/context_mount.c
parentlibfdisk: make fdisk_partition_to_string() more robust [coverity scan] (diff)
downloadkernel-qcow2-util-linux-7bc2fd3d2368c88c26ddc43e5f6dd3f9ac1c488d.tar.gz
kernel-qcow2-util-linux-7bc2fd3d2368c88c26ddc43e5f6dd3f9ac1c488d.tar.xz
kernel-qcow2-util-linux-7bc2fd3d2368c88c26ddc43e5f6dd3f9ac1c488d.zip
libmount: fix mem leak in do_mount_by_types() [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/context_mount.c')
-rw-r--r--libmount/src/context_mount.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c
index 71a4e85f9..455ef2ef0 100644
--- a/libmount/src/context_mount.c
+++ b/libmount/src/context_mount.c
@@ -787,8 +787,9 @@ static int do_mount_by_types(struct libmnt_context *cxt, const char *types)
if (strcmp(p, "auto") == 0) {
rc = mnt_context_guess_srcpath_fstype(cxt, &autotype);
if (rc) {
- DBG(CXT, ul_debugobj(cxt, "failed to guess FS type"));
+ DBG(CXT, ul_debugobj(cxt, "failed to guess FS type [rc=%d]", rc));
free(p0);
+ free(autotype);
return rc;
}
p = autotype;