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 <fiuczy@linux.ibm.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
This commit is contained in:
Marc Hartmayer 2024-04-23 20:08:51 +02:00 committed by Jonathon Jongsma
parent 0f87a53a0a
commit b13ddadc51

View File

@ -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;