From: YueHaibing Date: Mon, 30 Jul 2018 13:07:24 +0000 (+0800) Subject: fib_rules: NULL check before kfree is not needed X-Git-Tag: v4.19-rc1~140^2~190 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=778c4d5c5b96a61c7981ad6d841071326a713845;p=uclinux-h8%2Flinux.git fib_rules: NULL check before kfree is not needed kfree(NULL) is safe,so this removes NULL check before freeing the mem Signed-off-by: YueHaibing Signed-off-by: David S. Miller --- diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index f64aa13811ea..0ff3953f64aa 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c @@ -924,8 +924,7 @@ int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr *nlh, return 0; errout: - if (nlrule) - kfree(nlrule); + kfree(nlrule); rules_ops_put(ops); return err; }