[prevent][42562] Fix for resource leakage
[platform/upstream/at-spi2-core.git] / registryd / deviceeventcontroller.c
index 0039464..a7d3769 100644 (file)
@@ -1582,6 +1582,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);