From 7bc2fd3d2368c88c26ddc43e5f6dd3f9ac1c488d Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 29 Jan 2015 10:58:55 +0100 Subject: libmount: fix mem leak in do_mount_by_types() [coverity scan] Signed-off-by: Karel Zak --- libmount/src/context_mount.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libmount/src/context_mount.c') 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; -- cgit v1.2.3-55-g7522