From 7d02d777d4a7eb551999a35f52480c9ddac3d874 Mon Sep 17 00:00:00 2001 From: Simon Wunderlich Date: Fri, 7 May 2010 21:47:26 +0200 Subject: [PATCH] Staging: batman-adv: kfree_skb() in interface_tx() in error case As we always return that the we consumed the skb, we should also free the skb in the case of an error. Signed-off-by: Simon Wunderlich Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/soft-interface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/batman-adv/soft-interface.c b/drivers/staging/batman-adv/soft-interface.c index 14b5ccaeaca0..c3b52885b086 100644 --- a/drivers/staging/batman-adv/soft-interface.c +++ b/drivers/staging/batman-adv/soft-interface.c @@ -275,6 +275,7 @@ unlock: spin_unlock_irqrestore(&orig_hash_lock, flags); dropped: priv->stats.tx_dropped++; + kfree_skb(skb); end: return NETDEV_TX_OK; } -- 2.39.5