]> xenbits.xensource.com Git - libvirt.git/commitdiff
node_device_udev: Remove the timeout if the data is disposed
authorMarc Hartmayer <mhartmay@linux.ibm.com>
Tue, 23 Apr 2024 18:08:51 +0000 (20:08 +0200)
committerJonathon Jongsma <jjongsma@redhat.com>
Tue, 18 Jun 2024 14:00:15 +0000 (09:00 -0500)
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>
src/node_device/node_device_udev.c

index da8d14b0e7e6ea2880996e8d4bbfdf99dc08c4d2..5cf4fbbfc21433ec2461464ace89cdf04ad1b83c 100644 (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;