Skip to contentSkip to conversation

Possible dereference in net/core/rtnetlink.c

PATCH Applied Eric Sesterhenn 2 participants 2 messages Sep 26, 2006 – Sep 27, 2006 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Possible dereference in net/core/rtnetlink.c

hi,

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.

net/core/rtnetlink.c renamed from net/core/rtnetlink.c.orig +1 -1
@@ -562,7 +562,7 @@ static int rtnl_getlink(struct sk_buff *
 
 	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) {
maintainer Applied
#1 lore raw

From: Eric Sesterhenn <[email protected]>
Date: Tue, 26 Sep 2006 12:50:51 +0200

Quoted 5 lines

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.

Applied, thanks Eric.