提交 84a035f6 编写于 作者: G Geyslan G. Bem 提交者: David S. Miller

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: NGeyslan G. Bem <geyslan@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8422d1f1
......@@ -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]));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册