From: Nikolay Shirokovskiy Date: Wed, 6 Apr 2016 11:42:14 +0000 (+0300) Subject: vz: fix memory leak X-Git-Tag: v1.3.4-rc1~279 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4517eb0f4e844380327365f064352af87ad3e049;p=thirdparty%2Flibvirt.git 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 --- diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index 85ea0d7a98..f6dfed6d44 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -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);