udev: nodeStateInitializeEnumerate: remove watch handle in case of an error

If the udev thread is stopped, it must be ensured that the watch
handle is also removed from the main loop.

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
Marc Hartmayer 2019-02-20 11:05:45 +01:00 committed by John Ferlan
parent 632a8697c6
commit 9380d92d6f

View File

@ -1802,6 +1802,8 @@ nodeStateInitializeEnumerate(void *opaque)
error:
virObjectLock(priv);
ignore_value(virEventRemoveHandle(priv->watch));
priv->watch = -1;
priv->threadQuit = true;
virObjectUnlock(priv);
}