Skip to contentSkip to conversation

batman-adv: fix memory leak when dropping packet from other gateway

PATCH In review Sven Eckelmann 1 participant 2 messages May 19, 2017 Batman advanced

lore
Share & tools
lore

Sven Eckelmann

author maintainer
#0 lore raw

PATCH 1/1 batman-adv: fix memory leak when dropping packet from other gateway

From: Andreas Pape <[email protected]>

This patch fixes a memory leak introduced with commit "batman-adv:
drop unicast packets from other backbone gw".

Fixes bfe2a1971f43 ("batman-adv: drop unicast packets from other backbone gw")
---
 net/batman-adv/routing.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/batman-adv/routing.c +1 -1
index e1ebe14..ae9f4d3 100644
@@ -987,7 +987,7 @@ int batadv_recv_unicast_packet(struct sk_buff *skb,
 				batadv_dbg(BATADV_DBG_BLA, bat_priv,
 					   "recv_unicast_packet(): Dropped unicast pkt received from another backbone gw %pM.\n",
 					   orig_addr_gw);
-				return NET_RX_DROP;
+				goto free_skb;
 			}
 		}
 
Signature · 1 line
1.7.0.4
author maintainer
#1 lore raw
Quoted 10 lines · On Freitag, 19. Mai 2017 10:01:42 CEST Sven Eckelmann wrote:

From: Andreas Pape <[email protected]>

This patch fixes a memory leak introduced with commit "batman-adv:
drop unicast packets from other backbone gw".

Fixes bfe2a1971f43 ("batman-adv: drop unicast packets from other backbone gw")
---
 net/batman-adv/routing.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch applied as a58feb79ed1447e3e83f3b0b1a23779886869f39 [1]

Thanks,
Sven

[1] https://git.open-mesh.org/batman-adv.git/commit/a58feb79ed1447e3e83f3b0b1a23779886869f39