Commit d74be7ef authored by Antonio Quartulli's avatar Antonio Quartulli Committed by Greg Kroah-Hartman

batman-adv: free skb on TVLV parsing success

[ Upstream commit 05c3c8a6 ]

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 ef261577
("batman-adv: tvlv - basic infrastructure")
Reported-by: default avatarRussel Senior <russell@personaltelco.net>
Signed-off-by: default avatarAntonio Quartulli <antonio@open-mesh.com>
Tested-by: default avatarRussell Senior <russell@personaltelco.net>
Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 176890fa
......@@ -1063,6 +1063,8 @@ int batadv_recv_unicast_tvlv(struct sk_buff *skb,
if (ret != NET_RX_SUCCESS)
ret = batadv_route_unicast_packet(skb, recv_if);
else
consume_skb(skb);
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment