[at-spi2-core: 27/32] Reorder g_free around g_slist_remove




commit 239560a2492ac8b7d69eeff33e46dd6bc7b0355b
Author: Federico Mena Quintero <federico gnome org>
Date:   Tue Dec 14 16:02:03 2021 -0600

    Reorder g_free around g_slist_remove

 atspi/atspi-device-x11.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/atspi/atspi-device-x11.c b/atspi/atspi-device-x11.c
index 4f88e609..eafdba62 100644
--- a/atspi/atspi-device-x11.c
+++ b/atspi/atspi-device-x11.c
@@ -516,8 +516,8 @@ atspi_device_x11_unmap_modifier (AtspiDevice *device, gint keycode)
     AtspiX11KeyModifier *entry = l->data;
     if (entry->keycode == keycode)
     {
-      g_free (entry);
       priv->modifiers = g_slist_remove (priv->modifiers, entry);
+      g_free (entry);
       return;
     }
   }


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