summaryrefslogtreecommitdiff
path: root/gdbus
diff options
context:
space:
mode:
authorAnderson Lizardo <anderson.lizardo@openbossa.org>2014-02-10 17:14:56 (GMT)
committerMarcel Holtmann <marcel@holtmann.org>2014-02-19 07:13:53 (GMT)
commit90abd44eada4403deca651c1acc4a73043c9e63e (patch)
tree620be89b4092f0b754d0d38d70fd28f740345a83 /gdbus
parent278dba2ec85d8923dc36a151a1688a00a0d4317e (diff)
downloadofono-90abd44eada4403deca651c1acc4a73043c9e63e.tar.gz
ofono-90abd44eada4403deca651c1acc4a73043c9e63e.tar.xz
gdbus: Fix memory leak
data->conn and data->path must be destroyed before freeing "data".
Diffstat (limited to 'gdbus')
-rw-r--r--gdbus/object.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdbus/object.c b/gdbus/object.c
index b248cbb..13cf9a9 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -1253,6 +1253,8 @@ static struct generic_data *object_path_ref(DBusConnection *connection,
if (!dbus_connection_register_object_path(connection, path,
&generic_table, data)) {
+ dbus_connection_unref(data->conn);
+ g_free(data->path);
g_free(data->introspect);
g_free(data);
return NULL;