[libvirt] [PATCH 1/2] udev: nodeStateInitializeEnumerate: remove watch handle in case of an error
Marc Hartmayer
mhartmay at linux.ibm.com
Wed Feb 20 10:05:45 UTC 2019
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 at linux.ibm.com>
---
src/node_device/node_device_udev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 54f372cd4a9f..4dd2e9004fd7 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -1802,6 +1802,8 @@ nodeStateInitializeEnumerate(void *opaque)
error:
virObjectLock(priv);
+ ignore_value(virEventRemoveHandle(priv->watch));
+ priv->watch = -1;
priv->threadQuit = true;
virObjectUnlock(priv);
}
--
2.17.0
More information about the libvir-list
mailing list