2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 20:23:57 +08:00

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>
This commit is contained in:
Sreenivasa Honnur 2010-04-08 01:44:39 -07:00 committed by David S. Miller
parent 4d8dc67908
commit aaffbd9f77

View File

@ -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);