From: Eric Sesterhenn Date: Wed, 27 Sep 2006 06:26:38 +0000 (-0700) Subject: [RTNETLINK]: Possible dereference in net/core/rtnetlink.c X-Git-Tag: v2.6.19-rc1~858^2~114 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9918f230969bdaf3df012b77abcbcd4cdb0ab221;p=linux-2.6 [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 Signed-off-by: David S. Miller --- diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index d8e25e08cb..221e403821 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) 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) {