[PATCH 1/4] parallels: Fix initialization of buflen variable in each loop iteration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]