Fixes: fa66bd8cad2359b7d21676e0fd69bec472b36514
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
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