From: Gabor Juhos Date: Mon, 26 Oct 2009 17:17:37 +0000 (+0000) Subject: ramips: free allocated skbs in ramips_cleanup_dma X-Git-Tag: backfire_10.03~1746 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=941c1dae2c1e06424f9db917fb1af201d84487da;p=openwrt%2Fsvn-archive%2Fopenwrt.git ramips: free allocated skbs in ramips_cleanup_dma SVN-Revision: 18171 --- diff --git a/target/linux/ramips/files/drivers/net/ramips.c b/target/linux/ramips/files/drivers/net/ramips.c index 30840965a6..43ccdfc1f7 100644 --- a/target/linux/ramips/files/drivers/net/ramips.c +++ b/target/linux/ramips/files/drivers/net/ramips.c @@ -54,6 +54,11 @@ static void ramips_cleanup_dma(struct net_device *dev) { struct raeth_priv *priv = netdev_priv(dev); + int i; + + for (i = 0; i < NUM_RX_DESC; i++) + if (priv->rx_skb[i]) + dev_kfree_skb_any(priv->rx_skb[i]); dma_free_coherent(NULL, NUM_RX_DESC * sizeof(struct ramips_rx_dma), priv->rx, priv->phy_rx);