From: Antonio Quartulli Date: Tue, 11 Feb 2014 16:05:07 +0000 (+0100) Subject: batman-adv: free skb on TVLV parsing success X-Git-Tag: v3.13.6~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d74be7ef96bd38e40a3b19f431fc0e696249bed8;p=thirdparty%2Fkernel%2Fstable.git batman-adv: free skb on TVLV parsing success [ Upstream commit 05c3c8a636aa9ee35ce13f65afc5b665615cc786 ] 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 ef26157747d42254453f6b3ac2bd8bd3c53339c3 ("batman-adv: tvlv - basic infrastructure") Reported-by: Russel Senior Signed-off-by: Antonio Quartulli Tested-by: Russell Senior Signed-off-by: Marek Lindner Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c index cd9ffdb831d99..d1e8a147f3811 100644 --- a/net/batman-adv/routing.c +++ b/net/batman-adv/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; }