[PATCH 4/4] gatt-example: Fix memory leak.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remove the example-plugin data element from the list whenever an adapter
is removed.
---
 plugins/gatt-example.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/plugins/gatt-example.c b/plugins/gatt-example.c
index 5af07ea..701c1d7 100644
--- a/plugins/gatt-example.c
+++ b/plugins/gatt-example.c
@@ -541,6 +541,7 @@ static void gatt_example_adapter_remove(struct btd_adapter *adapter)
 		return;
 
 	gadapter = l->data;
+	adapters = g_slist_remove(adapters, gadapter);
 	gatt_example_adapter_free(gadapter);
 }
 
-- 
1.7.8.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux