summaryrefslogtreecommitdiff
path: root/registryd/deviceeventcontroller.c
diff options
context:
space:
mode:
authorMike Gorse <mgorse@suse.com>2022-03-24 15:21:18 +0000
committerMike Gorse <mgorse@suse.com>2022-03-24 15:21:18 +0000
commit90434d2a4a7a1195fca03bee02c7939a77433a51 (patch)
tree6356bc1ed29b3277599a7a1e9c6bb1e7974d3d25 /registryd/deviceeventcontroller.c
parent08036a4c4491eea57d7b713bb4440f541584204b (diff)
parent9f6523b9c6b96554485cab6cad9ed75f9cfad0f6 (diff)
downloadat-spi2-core-90434d2a4a7a1195fca03bee02c7939a77433a51.tar.gz
Merge branch 'leak' into 'master'
impl_deregister_keystroke_listener: Fix kd structure leak on iteration error See merge request GNOME/at-spi2-core!76
Diffstat (limited to 'registryd/deviceeventcontroller.c')
-rw-r--r--registryd/deviceeventcontroller.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/registryd/deviceeventcontroller.c b/registryd/deviceeventcontroller.c
index 3068ec4b..06d7c5e5 100644
--- a/registryd/deviceeventcontroller.c
+++ b/registryd/deviceeventcontroller.c
@@ -1388,6 +1388,7 @@ impl_register_keystroke_listener (DBusConnection *bus,
Accessibility_KeyDefinition *kd = (Accessibility_KeyDefinition *)g_malloc(sizeof(Accessibility_KeyDefinition));
if (!spi_dbus_message_iter_get_struct(&iter_array, DBUS_TYPE_INT32, &kd->keycode, DBUS_TYPE_INT32, &kd->keysym, DBUS_TYPE_STRING, &keystring, DBUS_TYPE_INVALID))
{
+ g_free(kd);
break;
}
kd->keystring = g_strdup (keystring);
@@ -1598,6 +1599,7 @@ impl_deregister_keystroke_listener (DBusConnection *bus,
if (!spi_dbus_message_iter_get_struct(&iter_array, DBUS_TYPE_INT32, &kd->keycode, DBUS_TYPE_INT32, &kd->keysym, DBUS_TYPE_STRING, &keystring, DBUS_TYPE_INVALID))
{
+ g_free(kd);
break;
}
kd->keystring = g_strdup (keystring);