netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* net-next-2.6 PATCH 1/4] vxge: Fix a possible memory leak in vxge_hw_device_initialize().
@ 2010-04-08  8:42 Sreenivasa Honnur
  2010-04-08  8:44 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Sreenivasa Honnur @ 2010-04-08  8:42 UTC (permalink / raw)
  To: davem; +Cc: netdev, support

- Fix a possible memory leak in vxge_hw_device_initialize(). Free hldev if
vxge_hw_device_reg_addr_get() fails.
 
Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@exar.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@exar.com>
---
diff -urpN orig/drivers/net/vxge/vxge-config.c patch1/drivers/net/vxge/vxge-config.c
--- orig/drivers/net/vxge/vxge-config.c	2010-04-01 12:03:33.000000000 +0530
+++ patch1/drivers/net/vxge/vxge-config.c	2010-04-01 12:05:55.000000000 +0530
@@ -634,8 +634,10 @@ vxge_hw_device_initialize(
 	__vxge_hw_device_pci_e_init(hldev);
 
 	status = __vxge_hw_device_reg_addr_get(hldev);
-	if (status != VXGE_HW_OK)
+	if (status != VXGE_HW_OK) {
+		vfree(hldev);
 		goto exit;
+	}
 	__vxge_hw_device_id_get(hldev);
 
 	__vxge_hw_device_host_info_get(hldev);


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-08  8:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-08  8:42 net-next-2.6 PATCH 1/4] vxge: Fix a possible memory leak in vxge_hw_device_initialize() Sreenivasa Honnur
2010-04-08  8:44 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).