mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-02 19:15:20 +00:00
vmx: fix resource leak
Error: RESOURCE_LEAK:
/libvirt/src/vmx/vmx.c:2431:
alloc_fn: Calling allocation function "calloc".
/libvirt/src/vmx/vmx.c:2431:
var_assign: Assigning: "networkName" = storage returned from "calloc(1UL, 1UL)".
/libvirt/src/vmx/vmx.c:2495:
leaked_storage: Variable "networkName" going out of scope leaks the storage it points to.
(cherry picked from commit 409a637eb1
)
This commit is contained in:
parent
655d3b2b87
commit
052ef069b1
@ -2485,6 +2485,7 @@ virVMXParseEthernet(virConfPtr conf, int controller, virDomainNetDefPtr *def)
|
||||
*def = NULL;
|
||||
}
|
||||
|
||||
VIR_FREE(networkName);
|
||||
VIR_FREE(connectionType);
|
||||
VIR_FREE(addressType);
|
||||
VIR_FREE(generatedAddress);
|
||||
|
Loading…
Reference in New Issue
Block a user