Skip to content

Commit

Permalink
Staging: batman-adv: kfree_skb() in interface_tx() in error case
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Simon Wunderlich authored and Greg Kroah-Hartman committed May 11, 2010
1 parent 19dae34 commit 7d02d77
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/staging/batman-adv/soft-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ int interface_tx(struct sk_buff *skb, struct net_device *dev)
spin_unlock_irqrestore(&orig_hash_lock, flags);
dropped:
priv->stats.tx_dropped++;
kfree_skb(skb);
end:
return NETDEV_TX_OK;
}
Expand Down

0 comments on commit 7d02d77

Please sign in to comment.