From: Geyslan G. Bem Date: Thu, 14 Nov 2013 19:12:54 +0000 (-0300) Subject: net/hsr: Fix possible leak in 'hsr_get_node_status()' X-Git-Tag: upstream/snapshot3+hdmi~3922^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=84a035f6940fbabef0826f4fabdd59ec8e131b81;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git net/hsr: Fix possible leak in 'hsr_get_node_status()' If 'hsr_get_node_data()' returns error, going directly to 'fail' label doesn't free the memory pointed by 'skb_out'. Signed-off-by: Geyslan G. Bem Signed-off-by: David S. Miller --- diff --git a/net/hsr/hsr_netlink.c b/net/hsr/hsr_netlink.c index 79d72ca..3b9205d 100644 --- a/net/hsr/hsr_netlink.c +++ b/net/hsr/hsr_netlink.c @@ -249,7 +249,7 @@ static int hsr_get_node_status(struct sk_buff *skb_in, struct genl_info *info) &hsr_node_if2_age, &hsr_node_if2_seq); if (res < 0) - goto fail; + goto nla_put_failure; res = nla_put(skb_out, HSR_A_NODE_ADDR, ETH_ALEN, nla_data(info->attrs[HSR_A_NODE_ADDR]));