mirror of https://gitee.com/openkylin/libvirt.git
util: event: check return value of virInitialize
This function can possibly fail.
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Fixes: 2e07a1e146
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
02552c2d1e
commit
a95fc75627
|
@ -305,7 +305,8 @@ int virEventRegisterDefaultImpl(void)
|
|||
{
|
||||
VIR_DEBUG("registering default event implementation");
|
||||
|
||||
virInitialize();
|
||||
if (virInitialize() < 0)
|
||||
return -1;
|
||||
|
||||
virResetLastError();
|
||||
|
||||
|
|
Loading…
Reference in New Issue