We need to initialize buflen every time when we get network adapter's friendly name because we call PrlVmDev_GetFriendlyName in a loop --- src/vz/vz_sdk.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index f9cde44..c36dad6 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -3150,6 +3150,7 @@ prlsdkGetDiskIndex(PRL_HANDLE sdkdom, virDomainDiskDefPtr disk) pret = PrlVmCfg_GetHardDisk(sdkdom, i, &hdd); prlsdkCheckRetGoto(pret, cleanup); + buflen = 0; pret = PrlVmDev_GetFriendlyName(hdd, 0, &buflen); prlsdkCheckRetGoto(pret, cleanup); -- 1.7.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list