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 6f35f84..d2e5919 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;
                }