Skip to content

Commit

Permalink
[RTNETLINK]: Possible dereference in net/core/rtnetlink.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Sesterhenn authored and David S. Miller committed Sep 29, 2006
1 parent 753ed90 commit 9918f23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/rtnetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
if (err < 0)
goto errout;
return err;

ifm = nlmsg_data(nlh);
if (ifm->ifi_index >= 0) {
Expand Down

0 comments on commit 9918f23

Please sign in to comment.