[at-spi2-core/gnome-3-34] Fix use-after-free when a device listener is destroyed



commit fe08837fcfda9017283184cec483015e64b14a12
Author: Colomban Wendling <cwendling hypra fr>
Date:   Thu Jun 11 10:00:05 2020 +0200

    Fix use-after-free when a device listener is destroyed
    
    Fixes #22.

 atspi/atspi-device-listener.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/atspi/atspi-device-listener.c b/atspi/atspi-device-listener.c
index 8e04c41..0d5ff35 100644
--- a/atspi/atspi-device-listener.c
+++ b/atspi/atspi-device-listener.c
@@ -177,7 +177,9 @@ atspi_device_listener_finalize (GObject *object)
 {
   AtspiDeviceListener *listener = (AtspiDeviceListener *) object;
   GList *l;
-  
+
+  device_listeners = g_list_remove (device_listeners, listener);
+
   for (l = listener->callbacks; l; l = l->next)
     {
       device_event_handler_free (l->data);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]