lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <513A1E8A.7040408@ll.mit.edu>
Date:	Fri, 8 Mar 2013 12:23:22 -0500
From:	David Oostdyk <daveo@...mit.edu>
To:	<netdev@...r.kernel.org>
CC:	<jes@...ined-monkey.org>, <daveo@...mit.edu>
Subject: [PATCH] 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@...mit.edu>
---
  drivers/net/hippi/rrunner.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/drivers/net/hippi/rrunner.c b/drivers/net/hippi/rrunner.c
index d471963..970595a 100644
--- a/drivers/net/hippi/rrunner.c
+++ b/drivers/net/hippi/rrunner.c
@@ -203,6 +203,9 @@ static int __devinit rr_init_one(struct pci_dev *pdev,
  	return 0;
    out:
+	if (rrpriv->evt_ring)
+		pci_free_consistent(pdev, EVT_RING_SIZE, rrpriv->evt_ring,
+				    rrpriv->evt_ring_dma);
  	if (rrpriv->rx_ring)
  		pci_free_consistent(pdev, RX_TOTAL_SIZE, rrpriv->rx_ring,
  				    rrpriv->rx_ring_dma);
-- 
1.8.1.5



Download attachment "smime.p7s" of type "application/pkcs7-signature" (4567 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ