[gnome-bluetooth/gnome-3-8] lib: Fix extraneous reference that could lead to crash
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/gnome-3-8] lib: Fix extraneous reference that could lead to crash
- Date: Wed, 20 Nov 2013 16:13:40 +0000 (UTC)
commit fbc1ce2836ccf17368fb6fe2aa0c69396c610aa5
Author: Bastien Nocera <hadess hadess net>
Date: Wed Nov 20 17:11:32 2013 +0100
lib: Fix extraneous reference that could lead to crash
The proxy we got from the tree model was already the extra
reference we needed. This makes sure that all additional
instances of the device (the ones not in the tree model)
are destroyed when cancelling a disconnect call.
lib/bluetooth-client.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index e224033..c5e86de 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -1900,7 +1900,7 @@ bluetooth_client_connect_service (BluetoothClient *client,
} else if (table != NULL) {
GDBusProxy *service;
- conndata->device = g_object_ref (DEVICE (proxy));
+ conndata->device = DEVICE (proxy);
conndata->services = g_hash_table_get_keys (table);
g_hash_table_unref (table);
conndata->services = g_list_sort (conndata->services, (GCompareFunc) rev_sort_services);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]