parallels: Fix initialization of buflen variable in each loop iteration

We need to initialize buflen every time when we get network adapter's
friendly name because we call PrlVmDev_GetFriendlyName in a loop
This commit is contained in:
Mikhail Feoktistov 2015-06-17 15:35:00 +03:00 committed by Dmitry Guryanov
parent 6fab625f96
commit fad9b77e0d
1 changed files with 1 additions and 0 deletions

View File

@ -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);