mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-27 22:51:31 +00:00
batman-adv: free skb on TVLV parsing success
When the TVLV parsing routine succeed the skb is left
untouched thus leading to a memory leak.
Fix this by consuming the skb in case of success.
Introduced by ef26157747
("batman-adv: tvlv - basic infrastructure")
Reported-by: Russel Senior <russell@personaltelco.net>
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Tested-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
This commit is contained in:
parent
a30e22ca84
commit
05c3c8a636
1 changed files with 2 additions and 0 deletions
|
@ -918,6 +918,8 @@ int batadv_recv_unicast_tvlv(struct sk_buff *skb,
|
||||||
|
|
||||||
if (ret != NET_RX_SUCCESS)
|
if (ret != NET_RX_SUCCESS)
|
||||||
ret = batadv_route_unicast_packet(skb, recv_if);
|
ret = batadv_route_unicast_packet(skb, recv_if);
|
||||||
|
else
|
||||||
|
consume_skb(skb);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue