Skip to content

Commit

Permalink
net/hsr: Fix possible leak in 'hsr_get_node_status()'
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
geyslan authored and davem330 committed Nov 14, 2013
1 parent 8422d1f commit 84a035f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/hsr/hsr_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]));
Expand Down

0 comments on commit 84a035f

Please sign in to comment.