From: Karel Zak Date: Mon, 12 Sep 2011 13:32:35 +0000 (+0200) Subject: libmount: redundant null check on calling free() [smatch scan] X-Git-Tag: v2.21-rc1~421 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ad84aaaa6cfdd9bd3aaec774abbf868faaa35b5b;p=thirdparty%2Futil-linux.git libmount: redundant null check on calling free() [smatch scan] Signed-off-by: Karel Zak --- diff --git a/libmount/src/context.c b/libmount/src/context.c index 22102607eb..e3158e48f8 100644 --- a/libmount/src/context.c +++ b/libmount/src/context.c @@ -1259,8 +1259,7 @@ int mnt_context_prepare_helper(struct libmnt_context *cxt, const char *name, if (rc) continue; - if (cxt->helper) - free(cxt->helper); + free(cxt->helper); cxt->helper = strdup(helper); if (!cxt->helper) return -ENOMEM;