diff options
author | Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> | 2011-06-03 01:52:18 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-05 17:18:19 -0400 |
commit | 5b446c6a7179513edcb34706088c4ce901b9a039 (patch) | |
tree | 054aa4223fa8b005c491627e11a62ce59cfbc246 /drivers/net | |
parent | 54ff502c283b6cf77c95c05c99dbca40d910b17d (diff) |
qlcnic: Avoid double free of skb in tx path
buffer->skb should be marked NULL to avoid double free of the skb.
Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index 3ab7d2c7baf2..0f6af5c61a7c 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c | |||
@@ -2159,6 +2159,7 @@ qlcnic_unmap_buffers(struct pci_dev *pdev, struct sk_buff *skb, | |||
2159 | 2159 | ||
2160 | nf = &pbuf->frag_array[0]; | 2160 | nf = &pbuf->frag_array[0]; |
2161 | pci_unmap_single(pdev, nf->dma, skb_headlen(skb), PCI_DMA_TODEVICE); | 2161 | pci_unmap_single(pdev, nf->dma, skb_headlen(skb), PCI_DMA_TODEVICE); |
2162 | pbuf->skb = NULL; | ||
2162 | } | 2163 | } |
2163 | 2164 | ||
2164 | static inline void | 2165 | static inline void |