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 <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
YueHaibing 2018-07-30 21:07:24 +08:00 committed by David S. Miller
parent 86ff73622a
commit 778c4d5c5b
1 changed files with 1 additions and 2 deletions

View File

@ -924,7 +924,6 @@ int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr *nlh,
return 0;
errout:
if (nlrule)
kfree(nlrule);
rules_ops_put(ops);
return err;