8139cp: Fix skb leak in rx_status_loop failure path.
authorDave Jones <davej@redhat.com>
Fri, 9 Aug 2013 18:16:34 +0000 (11:16 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Aug 2013 18:17:03 +0000 (11:17 -0700)
Introduced in cf3c4c03060b688cbc389ebc5065ebcce5653e96
("8139cp: Add dma_mapping_error checking")

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/8139cp.c

index 6f35f8404d68adeffa84e9adbdbe4927176db74e..d2e591955bdde3fd03b40dac1c9c22e3d013c23d 100644 (file)
@@ -524,6 +524,7 @@ rx_status_loop:
                                         PCI_DMA_FROMDEVICE);
                if (dma_mapping_error(&cp->pdev->dev, new_mapping)) {
                        dev->stats.rx_dropped++;
+                       kfree_skb(new_skb);
                        goto rx_next;
                }