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 <[email protected]>
Signed-off-by: Sven Eckelmann <[email protected]>
---
 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)
 unlock:
        spin_unlock_irqrestore(&bat_priv->orig_hash_lock, flags);
 dropped:
-       kfree_skb(skb);
        return 1;
 }
-- 
1.7.1

Reply via email to