]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: event: check return value of virInitialize
authorJán Tomko <jtomko@redhat.com>
Tue, 22 Sep 2020 21:17:18 +0000 (23:17 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 23 Sep 2020 11:26:34 +0000 (13:26 +0200)
This function can possibly fail.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Fixes: 2e07a1e14635ad25c57b66c13488feff4c8d2b0c
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/util/virevent.c

index 3477d635541245de6958bee928caefc87e4e60cc..f6eb806faf6ed76e0f1998869b8d3985ca3f2653 100644 (file)
@@ -305,7 +305,8 @@ int virEventRegisterDefaultImpl(void)
 {
     VIR_DEBUG("registering default event implementation");
 
-    virInitialize();
+    if (virInitialize() < 0)
+        return -1;
 
     virResetLastError();