diff options
author | David Oostdyk <daveo@ll.mit.edu> | 2013-03-08 03:28:15 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-10 16:42:23 -0400 |
commit | fef4c86e59a76f2ec1a77d5732f40752700bd5dd (patch) | |
tree | a055127e04ca03bb1540dbf797385c1e644f946f /drivers/net | |
parent | 29cd8ae0e1a39e239a3a7b67da1986add1199fc0 (diff) |
rrunner.c: fix possible memory leak in rr_init_one()
In the event that register_netdev() failed, the rrpriv->evt_ring
allocation would have not been freed.
Signed-off-by: David Oostdyk <daveo@ll.mit.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/hippi/rrunner.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/hippi/rrunner.c b/drivers/net/hippi/rrunner.c index e5b19b056909..3c4d6274bb9b 100644 --- a/drivers/net/hippi/rrunner.c +++ b/drivers/net/hippi/rrunner.c | |||
@@ -202,6 +202,9 @@ static int rr_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
202 | return 0; | 202 | return 0; |
203 | 203 | ||
204 | out: | 204 | out: |
205 | if (rrpriv->evt_ring) | ||
206 | pci_free_consistent(pdev, EVT_RING_SIZE, rrpriv->evt_ring, | ||
207 | rrpriv->evt_ring_dma); | ||
205 | if (rrpriv->rx_ring) | 208 | if (rrpriv->rx_ring) |
206 | pci_free_consistent(pdev, RX_TOTAL_SIZE, rrpriv->rx_ring, | 209 | pci_free_consistent(pdev, RX_TOTAL_SIZE, rrpriv->rx_ring, |
207 | rrpriv->rx_ring_dma); | 210 | rrpriv->rx_ring_dma); |