Skip to content

Commit

Permalink
spidernet : fix memory leak in spider_net_stop
Browse files Browse the repository at this point in the history
We forget to call spider_net_free_rx_chain_contents which does the
actual dev_kfree_skb. New skbs are allocated from skbuff_head_cache
on each "ifconfig up" letting the cache grow infinitely.

This patch fixes it.

Signed-off-by: Jens Osterkamp <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
  • Loading branch information
Jens Osterkamp authored and Jeff Garzik committed Feb 2, 2007
1 parent a53a33d commit a55eb05
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/spider_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1925,6 +1925,8 @@ spider_net_stop(struct net_device *netdev)
/* release chains */
spider_net_release_tx_chain(card, 1);

spider_net_free_rx_chain_contents(card);

spider_net_free_chain(card, &card->tx_chain);
spider_net_free_chain(card, &card->rx_chain);

Expand Down

0 comments on commit a55eb05

Please sign in to comment.