mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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:
parent
6fab625f96
commit
fad9b77e0d
@ -3150,6 +3150,7 @@ prlsdkGetDiskIndex(PRL_HANDLE sdkdom, virDomainDiskDefPtr disk)
|
|||||||
pret = PrlVmCfg_GetHardDisk(sdkdom, i, &hdd);
|
pret = PrlVmCfg_GetHardDisk(sdkdom, i, &hdd);
|
||||||
prlsdkCheckRetGoto(pret, cleanup);
|
prlsdkCheckRetGoto(pret, cleanup);
|
||||||
|
|
||||||
|
buflen = 0;
|
||||||
pret = PrlVmDev_GetFriendlyName(hdd, 0, &buflen);
|
pret = PrlVmDev_GetFriendlyName(hdd, 0, &buflen);
|
||||||
prlsdkCheckRetGoto(pret, cleanup);
|
prlsdkCheckRetGoto(pret, cleanup);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user