diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-09-27 02:26:38 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-28 21:01:23 -0400 |
commit | 9918f230969bdaf3df012b77abcbcd4cdb0ab221 (patch) | |
tree | 8cad5227f352a2a0756b2978339eff4b0a5ba0cb | |
parent | 753ed90d92009260616f6402aafa7ee47e03b162 (diff) |
[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>
-rw-r--r-- | net/core/rtnetlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index d8e25e08cb7e..221e4038216b 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -562,7 +562,7 @@ static int rtnl_getlink(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) | |||
562 | 562 | ||
563 | err = nlmsg_parse(nlh, sizeof(*ifm), tb, IFLA_MAX, ifla_policy); | 563 | err = nlmsg_parse(nlh, sizeof(*ifm), tb, IFLA_MAX, ifla_policy); |
564 | if (err < 0) | 564 | if (err < 0) |
565 | goto errout; | 565 | return err; |
566 | 566 | ||
567 | ifm = nlmsg_data(nlh); | 567 | ifm = nlmsg_data(nlh); |
568 | if (ifm->ifi_index >= 0) { | 568 | if (ifm->ifi_index >= 0) { |