From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Antonio Quartulli Date: Tue, 11 Feb 2014 17:05:07 +0100 Message-Id: <1392134707-2318-2-git-send-email-antonio@meshcoding.com> In-Reply-To: <1392134707-2318-1-git-send-email-antonio@meshcoding.com> References: <1392134707-2318-1-git-send-email-antonio@meshcoding.com> Subject: [B.A.T.M.A.N.] [PATCH maint 2/2] batman-adv: free skb on TVLV parsing success Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: b.a.t.m.a.n@lists.open-mesh.org Cc: Antonio Quartulli From: Antonio Quartulli 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") Signed-off-by: Antonio Quartulli --- 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; } -- 1.8.5.3