Commit e44de649 authored by Mike Gorse's avatar Mike Gorse Committed by Mike Gorse

Free match rule array only once when deregistering event listeners

parent c305d9d0
......@@ -708,9 +708,7 @@ atspi_event_listener_deregister_from_callback (AtspiEventListenerCB callback,
{
char *matchrule = g_ptr_array_index (matchrule_array, i);
dbus_bus_remove_match (_atspi_bus(), matchrule, &d_error);
g_free (matchrule);
}
g_ptr_array_free (matchrule_array, TRUE);
dbus_error_init (&d_error);
message = dbus_message_new_method_call (atspi_bus_registry,
atspi_path_registry,
......@@ -730,6 +728,9 @@ atspi_event_listener_deregister_from_callback (AtspiEventListenerCB callback,
g_free (category);
g_free (name);
if (detail) g_free (detail);
for (i = 0; i < matchrule_array->len; i++)
g_free (g_ptr_array_index (matchrule_array, i));
g_ptr_array_free (matchrule_array, TRUE);
return TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment