Skip to content

Commit

Permalink
qlcnic: Avoid double free of skb in tx path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sucheta Chakraborty authored and David S. Miller committed Jun 5, 2011
1 parent 54ff502 commit 5b446c6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/qlcnic/qlcnic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2159,6 +2159,7 @@ qlcnic_unmap_buffers(struct pci_dev *pdev, struct sk_buff *skb,

nf = &pbuf->frag_array[0];
pci_unmap_single(pdev, nf->dma, skb_headlen(skb), PCI_DMA_TODEVICE);
pbuf->skb = NULL;
}

static inline void
Expand Down

0 comments on commit 5b446c6

Please sign in to comment.