[gvfs/wip/oholy/gtask: 1/17] client: Do not leak GDBusConnection reference
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs/wip/oholy/gtask: 1/17] client: Do not leak GDBusConnection reference
- Date: Tue, 24 Jan 2017 15:57:24 +0000 (UTC)
commit 80bc0f4a2feaaa708b4cd82d4ef4e359558136c5
Author: Ondrej Holy <oholy redhat com>
Date: Tue Jan 24 14:29:57 2017 +0100
client: Do not leak GDBusConnection reference
async_construct_proxy() calls g_object_ref() on connection, because
the connection is unrefed by async_call_finish(). The returned connection
might be NULL in some cases and g_bus_get() is called instead. However,
g_bus_get_finish() is "transfer full" and thus one reference is leaked.
https://bugzilla.gnome.org/show_bug.cgi?id=747412
client/gdaemonfile.c | 1 +
client/gdaemonmount.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/client/gdaemonfile.c b/client/gdaemonfile.c
index abc81cf..ac24014 100644
--- a/client/gdaemonfile.c
+++ b/client/gdaemonfile.c
@@ -626,6 +626,7 @@ bus_get_cb (GObject *source_object,
}
async_construct_proxy (connection, data);
+ g_object_unref (connection);
}
static void
diff --git a/client/gdaemonmount.c b/client/gdaemonmount.c
index 9bba2d1..d49fad8 100644
--- a/client/gdaemonmount.c
+++ b/client/gdaemonmount.c
@@ -303,6 +303,7 @@ bus_get_cb (GObject *source_object,
}
async_construct_proxy (connection, task);
+ g_object_unref (connection);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]