From b13ddadc5127b00c57841fd46dac5acf2dd3c690 Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Tue, 23 Apr 2024 20:08:51 +0200 Subject: [PATCH] node_device_udev: Remove the timeout if the data is disposed Remove the timeout when the udevEventData is disposed, analogous to priv->watch. Reviewed-by: Boris Fiuczynski Reviewed-by: Jonathon Jongsma Signed-off-by: Marc Hartmayer --- src/node_device/node_device_udev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c index da8d14b0e7..5cf4fbbfc2 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -88,6 +88,9 @@ udevEventDataDispose(void *obj) if (priv->watch != -1) virEventRemoveHandle(priv->watch); + if (priv->mdevctlTimeout > 0) + virEventRemoveTimeout(priv->mdevctlTimeout); + if (!priv->udev_monitor) return;