mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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);
|
buflen = ARRAY_CARDINALITY(macstr);
|
||||||
if (VIR_ALLOC_N(macstr, buflen))
|
|
||||||
goto cleanup;
|
|
||||||
pret = PrlVmDevNet_GetMacAddressCanonical(netAdapter, macstr, &buflen);
|
pret = PrlVmDevNet_GetMacAddressCanonical(netAdapter, macstr, &buflen);
|
||||||
prlsdkCheckRetGoto(pret, cleanup);
|
prlsdkCheckRetGoto(pret, cleanup);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user