diff options
author | Sreenivasa Honnur <sreenivasa.honnur@exar.com> | 2010-04-08 01:44:39 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-08 01:48:06 -0700 |
commit | aaffbd9f7734721bf42d246eb31fc79d7adb2cb9 (patch) | |
tree | 2fdff99d9a570828d30755081b742261d2e7bab3 /drivers/net/vxge | |
parent | 4d8dc679084d8dd7b81b2ae245844246deb0759c (diff) | |
download | kernel_samsung_crespo-aaffbd9f7734721bf42d246eb31fc79d7adb2cb9.zip kernel_samsung_crespo-aaffbd9f7734721bf42d246eb31fc79d7adb2cb9.tar.gz kernel_samsung_crespo-aaffbd9f7734721bf42d246eb31fc79d7adb2cb9.tar.bz2 |
vxge: Fix a possible memory leak in vxge_hw_device_initialize().
- 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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxge')
-rw-r--r-- | drivers/net/vxge/vxge-config.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/vxge/vxge-config.c b/drivers/net/vxge/vxge-config.c index ec4408c..66dd589 100644 --- a/drivers/net/vxge/vxge-config.c +++ b/drivers/net/vxge/vxge-config.c @@ -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); |