OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86ff736
)
fib_rules: NULL check before kfree is not needed
author
YueHaibing
<yuehaibing@huawei.com>
Mon, 30 Jul 2018 13:07:24 +0000
(21:07 +0800)
committer
David S. Miller
<davem@davemloft.net>
Mon, 30 Jul 2018 16:44:06 +0000
(09:44 -0700)
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>
net/core/fib_rules.c
patch
|
blob
|
history
diff --git
a/net/core/fib_rules.c
b/net/core/fib_rules.c
index
f64aa13
..
0ff3953
100644
(file)
--- 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;
}