提交 7d02d777 编写于 作者: S Simon Wunderlich 提交者: Greg Kroah-Hartman

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: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 19dae340
...@@ -275,6 +275,7 @@ int interface_tx(struct sk_buff *skb, struct net_device *dev) ...@@ -275,6 +275,7 @@ int interface_tx(struct sk_buff *skb, struct net_device *dev)
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;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册