Browse Source

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 <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Simon Wunderlich 15 years ago
parent
commit
7d02d777d4
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/staging/batman-adv/soft-interface.c

+ 1 - 0
drivers/staging/batman-adv/soft-interface.c

@@ -275,6 +275,7 @@ unlock:
 	spin_unlock_irqrestore(&orig_hash_lock, flags);
 	spin_unlock_irqrestore(&orig_hash_lock, flags);
 dropped:
 dropped:
 	priv->stats.tx_dropped++;
 	priv->stats.tx_dropped++;
+	kfree_skb(skb);
 end:
 end:
 	return NETDEV_TX_OK;
 	return NETDEV_TX_OK;
 }
 }