[at-spi2-atk/gnome-3-8] socket-adaptor: fix memory leak
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-atk/gnome-3-8] socket-adaptor: fix memory leak
- Date: Thu, 28 Mar 2013 10:26:36 +0000 (UTC)
commit 228251b1948d18f50ef99688eb6bb3f3b09a411b
Author: Xan Lopez <xan igalia com>
Date: Wed Mar 27 21:40:12 2013 +0100
socket-adaptor: fix memory leak
Set a destructor for the object data. Other than fixing a leak this
also allows to simplify the code a bit.
https://bugzilla.gnome.org/show_bug.cgi?id=696733
atk-adaptor/adaptors/socket-adaptor.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/atk-adaptor/adaptors/socket-adaptor.c b/atk-adaptor/adaptors/socket-adaptor.c
index d7ebe5f..9aff7d7 100644
--- a/atk-adaptor/adaptors/socket-adaptor.c
+++ b/atk-adaptor/adaptors/socket-adaptor.c
@@ -173,11 +173,8 @@ impl_Embedded (DBusConnection *bus,
{
return droute_invalid_arguments_error (message);
}
- id = g_object_get_data (G_OBJECT (object), "dbus-plug-parent");
- if (id)
- g_free (id);
id = g_strconcat (dbus_message_get_sender (message), ":", path, NULL);
- g_object_set_data (G_OBJECT (object), "dbus-plug-parent", id);
+ g_object_set_data_full (G_OBJECT (object), "dbus-plug-parent", id, (GDestroyNotify)g_free);
if (ATK_IS_COMPONENT (object))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]