batman-adv: Don't free unicast skb on failure

Message ID
State Superseded, archived

Commit Message

Sven Eckelmann Sept. 4, 2010, 10:25 p.m. UTC
  The soft-interface transmission function expects that the unicast skb is
still available when a send failed. Otherwise we would try to free the
skb twice and create many different and hard to debug memory access
failures due to access on not (anymore) allocated memory.

Reported-by: Andreas Langer <>
Signed-off-by: Sven Eckelmann <>
 unicast.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)


diff --git a/unicast.c b/unicast.c
index 84b204b..796d9c1 100644
--- a/unicast.c
+++ b/unicast.c
@@ -264,6 +264,5 @@  int unicast_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv)
 	spin_unlock_irqrestore(&bat_priv->orig_hash_lock, flags);
-	kfree_skb(skb);
 	return 1;