Skip to content

Commit

Permalink
vxge: Fix a possible memory leak in vxge_hw_device_initialize().
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
Sreenivasa Honnur authored and David S. Miller committed Apr 8, 2010
1 parent 4d8dc67 commit aaffbd9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/vxge/vxge-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit aaffbd9

Please sign in to comment.