[libvirt PATCH 4/4] hyperv: check return value of virUUIDGenerate

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

 



Fixes: fa66bd8cad2359b7d21676e0fd69bec472b36514
Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 src/hyperv/hyperv_driver.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c
index c1ed4b5c7c..701456cdb3 100644
--- a/src/hyperv/hyperv_driver.c
+++ b/src/hyperv/hyperv_driver.c
@@ -1080,7 +1080,9 @@ hypervDomainAttachSyntheticEthernetAdapter(virDomainPtr domain,
      */
     portResourceType = g_strdup_printf("%d", MSVM_RASD_RESOURCETYPE_ETHERNET_ADAPTER);
 
-    virUUIDGenerate(vsiGuid);
+    if (virUUIDGenerate(vsiGuid) < 0)
+        return -1;
+
     virUUIDFormat(vsiGuid, guidString);
     virtualSystemIdentifiers = g_strdup_printf("{%s}", guidString);
 
-- 
2.26.2




[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]

  Powered by Linux