[gnome-bluetooth] settings: Fix BluetoothClient reference leak
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] settings: Fix BluetoothClient reference leak
- Date: Fri, 31 Jul 2015 13:05:29 +0000 (UTC)
commit 95b39826c47e6b1727dbe053f8b948baec517c17
Author: Bastien Nocera <hadess hadess net>
Date: Fri Jul 31 15:00:29 2015 +0200
settings: Fix BluetoothClient reference leak
lib/bluetooth-settings-obexpush.c | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/lib/bluetooth-settings-obexpush.c b/lib/bluetooth-settings-obexpush.c
index bf207e3..823cc90 100644
--- a/lib/bluetooth-settings-obexpush.c
+++ b/lib/bluetooth-settings-obexpush.c
@@ -789,23 +789,23 @@ obex_agent_new (void)
void
obex_agent_down (void)
{
- if (agent == NULL)
- return;
-
- g_dbus_connection_call (agent->connection,
- MANAGER_SERVICE,
- MANAGER_PATH,
- MANAGER_IFACE,
- "UnregisterAgent",
- g_variant_new ("(o)", AGENT_PATH),
- NULL,
- G_DBUS_CALL_FLAGS_NONE,
- -1,
- NULL,
- NULL,
- NULL);
+ if (agent != NULL) {
+ g_dbus_connection_call (agent->connection,
+ MANAGER_SERVICE,
+ MANAGER_PATH,
+ MANAGER_IFACE,
+ "UnregisterAgent",
+ g_variant_new ("(o)", AGENT_PATH),
+ NULL,
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL,
+ NULL,
+ NULL);
+ }
g_clear_object (&agent);
+ g_clear_object (&client);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]