mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 12:16:20 +00:00
[RTNETLINK]: Possible dereference in net/core/rtnetlink.c
another possible dereference spotted by coverity (#cid 1390). if the nlmsg_parse() call fails, we goto errout, where we call dev_put(), with dev still initialized to NULL. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
753ed90d92
commit
9918f23096
1 changed files with 1 additions and 1 deletions
|
@ -562,7 +562,7 @@ static int rtnl_getlink(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
|
||||||
|
|
||||||
err = nlmsg_parse(nlh, sizeof(*ifm), tb, IFLA_MAX, ifla_policy);
|
err = nlmsg_parse(nlh, sizeof(*ifm), tb, IFLA_MAX, ifla_policy);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto errout;
|
return err;
|
||||||
|
|
||||||
ifm = nlmsg_data(nlh);
|
ifm = nlmsg_data(nlh);
|
||||||
if (ifm->ifi_index >= 0) {
|
if (ifm->ifi_index >= 0) {
|
||||||
|
|
Loading…
Reference in a new issue