diff options
author | Geyslan G. Bem <geyslan@gmail.com> | 2013-11-14 14:12:54 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-11-14 17:26:21 -0500 |
commit | 84a035f6940fbabef0826f4fabdd59ec8e131b81 (patch) | |
tree | 1d657bbd0cb8141fec94ca7b69d135a772588245 /net/hsr | |
parent | 8422d1f1812121b85affc1c92aac4aca66865988 (diff) |
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>
Diffstat (limited to 'net/hsr')
-rw-r--r-- | net/hsr/hsr_netlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/hsr/hsr_netlink.c b/net/hsr/hsr_netlink.c index 79d72ca309ce..3b9205d2afc4 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) | |||
249 | &hsr_node_if2_age, | 249 | &hsr_node_if2_age, |
250 | &hsr_node_if2_seq); | 250 | &hsr_node_if2_seq); |
251 | if (res < 0) | 251 | if (res < 0) |
252 | goto fail; | 252 | goto nla_put_failure; |
253 | 253 | ||
254 | res = nla_put(skb_out, HSR_A_NODE_ADDR, ETH_ALEN, | 254 | res = nla_put(skb_out, HSR_A_NODE_ADDR, ETH_ALEN, |
255 | nla_data(info->attrs[HSR_A_NODE_ADDR])); | 255 | nla_data(info->attrs[HSR_A_NODE_ADDR])); |