mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
vz: fix memory leak
we don't need to allocate macstr at all as it is an array and already has the the space it needs. Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
This commit is contained in:
parent
1278688921
commit
4517eb0f4e
@ -757,8 +757,6 @@ prlsdkGetNetInfo(PRL_HANDLE netAdapter, virDomainNetDefPtr net, bool isCt)
|
||||
}
|
||||
|
||||
buflen = ARRAY_CARDINALITY(macstr);
|
||||
if (VIR_ALLOC_N(macstr, buflen))
|
||||
goto cleanup;
|
||||
pret = PrlVmDevNet_GetMacAddressCanonical(netAdapter, macstr, &buflen);
|
||||
prlsdkCheckRetGoto(pret, cleanup);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user