[at-spi2-core: 21/32] Reorder g_free around g_slist_remove
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core: 21/32] Reorder g_free around g_slist_remove
- Date: Tue, 14 Dec 2021 22:30:57 +0000 (UTC)
commit 74c8498deda75f3e1c1ead8977eb85f15fb350b8
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Dec 14 13:20:40 2021 -0600
Reorder g_free around g_slist_remove
To avoid using a freed pointer. It's harmless, but static-scan complains.
atspi/atspi-device-legacy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/atspi/atspi-device-legacy.c b/atspi/atspi-device-legacy.c
index eb677685..bfb63d4b 100644
--- a/atspi/atspi-device-legacy.c
+++ b/atspi/atspi-device-legacy.c
@@ -212,8 +212,8 @@ atspi_device_legacy_unmap_modifier (AtspiDevice *device, gint keycode)
AtspiLegacyKeyModifier *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]