Repository : ssh://git@open-mesh.org/batman-adv
On branch : maint
commit 9289542085d7e298b90c7b6fb6efb509dab69d8b Author: Antonio Quartulli antonio@open-mesh.com Date: Tue Feb 11 17:05:07 2014 +0100
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 0b6aa0d43767889eeda43a132cf5e73df4e63bf2 ("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
9289542085d7e298b90c7b6fb6efb509dab69d8b routing.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/routing.c b/routing.c index f7579d0..71bf698 100644 --- a/routing.c +++ b/routing.c @@ -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; }