[at-spi2-core] Free match rule array only once when deregistering event listeners
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core] Free match rule array only once when deregistering event listeners
- Date: Fri, 16 Dec 2011 18:27:54 +0000 (UTC)
commit 85ad337b9b88bbd7f97e1776bf85e9ee14956af7
Author: Mike Gorse <mgorse novell com>
Date: Fri Dec 16 13:29:32 2011 -0500
Free match rule array only once when deregistering event listeners
atspi/atspi-event-listener.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/atspi/atspi-event-listener.c b/atspi/atspi-event-listener.c
index d4761ee..b397d6f 100644
--- a/atspi/atspi-event-listener.c
+++ b/atspi/atspi-event-listener.c
@@ -706,9 +706,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,
@@ -728,6 +726,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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]