From: Karel Zak Date: Tue, 3 Feb 2015 13:05:05 +0000 (+0100) Subject: libmount: fix type pointer usage X-Git-Tag: v2.26-rc2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c8cd4ba7a1a85c437ef63f462d20f0b944778d0;p=thirdparty%2Futil-linux.git libmount: fix type pointer usage Signed-off-by: Karel Zak --- diff --git a/libmount/src/context.c b/libmount/src/context.c index dff7a47fd5..c902f396e0 100644 --- a/libmount/src/context.c +++ b/libmount/src/context.c @@ -1718,8 +1718,8 @@ int mnt_context_guess_fstype(struct libmnt_context *cxt) rc = mnt_context_guess_srcpath_fstype(cxt, &type); if (rc == 0 && type) __mnt_fs_set_fstype_ptr(cxt->fs, type); - - free(type); + else + free(type); done: DBG(CXT, ul_debugobj(cxt, "FS type: %s [rc=%d]", mnt_fs_get_fstype(cxt->fs), rc));