]> git.ipfire.org Git - thirdparty/libvirt.git/commit
node_device_udev: Fix leak of mdevctlLock, udevThreadCond, and mdevCtlMonitors
authorMarc Hartmayer <mhartmay@linux.ibm.com>
Tue, 23 Apr 2024 18:08:58 +0000 (20:08 +0200)
committerJonathon Jongsma <jjongsma@redhat.com>
Tue, 18 Jun 2024 14:00:26 +0000 (09:00 -0500)
commit6e727d8bdcd1fe257575d65af7ac62158ea7f224
tree16290cd08390700eb96c99764f7e9994b34758be
parent4daa3627067da9eb71962da6d28a4e2a1a691e95
node_device_udev: Fix leak of mdevctlLock, udevThreadCond, and mdevCtlMonitors

Even if `priv->udev_monitor` was never initialized, the mdevctlLock, udevThread
were. Therefore let's match the order of releasing the resources the order of
allocating the resources in `nodeStateInitialize`.

In addition, use `g_steal_pointer` in `g_list_free_full`.

Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
src/node_device/node_device_udev.c