we don't need to allocate mastr at all as it is array and already have the the space it needs. Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx> --- src/vz/vz_sdk.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index 0d853d0..443f753 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -749,8 +749,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); -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list