diff options
author | Karel Zak <kzak@redhat.com> | 2015-02-03 14:05:05 +0100 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2015-02-03 14:05:05 +0100 |
commit | 0c8cd4ba7a1a85c437ef63f462d20f0b944778d0 (patch) | |
tree | ac6b90c682314a3b1193c86d4f40e8c257f03be1 | |
parent | d527d2dd6463b47612f6a5da17ac6f60c349fbd2 (diff) | |
download | util-linux-playground-0c8cd4ba7a1a85c437ef63f462d20f0b944778d0.tar.gz |
libmount: fix type pointer usage
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | libmount/src/context.c | 4 |
1 files changed, 2 insertions, 2 deletions
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)); |