Skip to content

Commit 84a035f

Browse files
geyslandavem330
authored andcommitted
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 <geyslan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 8422d1f commit 84a035f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/hsr/hsr_netlink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ static int hsr_get_node_status(struct sk_buff *skb_in, struct genl_info *info)
249249
&hsr_node_if2_age,
250250
&hsr_node_if2_seq);
251251
if (res < 0)
252-
goto fail;
252+
goto nla_put_failure;
253253

254254
res = nla_put(skb_out, HSR_A_NODE_ADDR, ETH_ALEN,
255255
nla_data(info->attrs[HSR_A_NODE_ADDR]));

0 commit comments

Comments
 (0)