[at-spi2-atk] Don't leak path in emit_event
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-atk] Don't leak path in emit_event
- Date: Sat, 19 Feb 2011 14:17:35 +0000 (UTC)
commit ecb8a841c855afd7539834735aaf42663ec79cf9
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Feb 19 09:17:03 2011 -0500
Don't leak path in emit_event
https://bugzilla.gnome.org/show_bug.cgi?id=642615
atk-adaptor/event.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/atk-adaptor/event.c b/atk-adaptor/event.c
index 81a0f34..fd96404 100644
--- a/atk-adaptor/event.c
+++ b/atk-adaptor/event.c
@@ -397,8 +397,7 @@ emit_event (AtkObject *obj,
void (*append_variant) (DBusMessageIter *, const char *, const void *))
{
DBusConnection *bus = spi_global_app_data->bus;
- const char *path = spi_register_object_to_path (spi_global_register,
- G_OBJECT (obj));
+ const char *path;
gchar *cname, *t;
DBusMessage *sig;
@@ -412,6 +411,8 @@ emit_event (AtkObject *obj,
if (!signal_is_needed (klass, major, minor))
return;
+ path = spi_register_object_to_path (spi_global_register, G_OBJECT (obj));
+
/*
* This is very annoying, but as '-' isn't a legal signal
* name in D-Bus (Why not??!?) The names need converting
@@ -435,6 +436,7 @@ emit_event (AtkObject *obj,
spi_object_lease_if_needed (G_OBJECT (obj));
g_free(cname);
+ g_free (path);
}
/*---------------------------------------------------------------------------*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]