summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2010-04-30 00:27:54 +0300
committerMarcel Holtmann <marcel@holtmann.org>2010-04-29 23:45:25 +0200
commitf0c4a9640991d4d4803437854105619d8301e66c (patch)
treeb08e794a4ebdee5fcafd87be3b61dda244010fec
parentf66dee4c1de4a3e732a4278f4368836e613abda8 (diff)
downloadconnman-f0c4a9640991d4d4803437854105619d8301e66c.tar.gz
connman-f0c4a9640991d4d4803437854105619d8301e66c.tar.bz2
connman-f0c4a9640991d4d4803437854105619d8301e66c.zip
Fix memory leak in g_dbus_register_interface
-rw-r--r--gdbus/object.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdbus/object.c b/gdbus/object.c
index 8da2dabf..592e2d3c 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -514,8 +514,10 @@ gboolean g_dbus_register_interface(DBusConnection *connection,
if (data == NULL)
return FALSE;
- if (find_interface(data->interfaces, name))
+ if (find_interface(data->interfaces, name)) {
+ object_path_unref(connection, path);
return FALSE;
+ }
add_interface(data, name, methods, signals,
properties, user_data, destroy);