Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Use reference counting of the device object while discovering services
@ 2010-11-10 21:55 Claudio Takahasi
  2010-11-10 21:56 ` [PATCH] Fix possible memory leak of the GIOChannel in the attribute server Claudio Takahasi
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Claudio Takahasi @ 2010-11-10 21:55 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Claudio Takahasi

---
 attrib/client.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/attrib/client.c b/attrib/client.c
index 1f2c217..955e623 100644
--- a/attrib/client.c
+++ b/attrib/client.c
@@ -158,6 +158,7 @@ static void gatt_service_free(void *user_data)
 	g_slist_free(gatt->primary);
 	g_attrib_unref(gatt->attrib);
 	g_free(gatt->path);
+	btd_device_unref(gatt->dev);
 	g_free(gatt);
 }
 
@@ -1335,7 +1336,7 @@ int attrib_client_register(struct btd_device *device, int psm)
 	device_get_address(device, &dba);
 
 	gatt = g_new0(struct gatt_service, 1);
-	gatt->dev = device;
+	gatt->dev = btd_device_ref(device);
 	gatt->listen = FALSE;
 	gatt->path = g_strdup(path);
 	bacpy(&gatt->sba, &sba);
-- 
1.7.3.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-11-11 13:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-10 21:55 [PATCH] Use reference counting of the device object while discovering services Claudio Takahasi
2010-11-10 21:56 ` [PATCH] Fix possible memory leak of the GIOChannel in the attribute server Claudio Takahasi
2010-11-11 10:09   ` Johan Hedberg
2010-11-10 21:56 ` [PATCH] Add a new configuration option to disable Low Energy support Claudio Takahasi
2010-11-11  9:18   ` Johan Hedberg
2010-11-11 13:20     ` Claudio Takahasi
2010-11-11 13:30       ` Johan Hedberg
2010-11-11 10:08 ` [PATCH] Use reference counting of the device object while discovering services Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox