From 927ec06fe216b45e222385768f527923e8fd9457 Mon Sep 17 00:00:00 2001 From: Santiago Carot-Nemesio Date: Fri, 30 Dec 2011 12:45:09 +0100 Subject: [PATCH] gatt-example: Fix memory leak Remove the example-plugin data element from the list whenever an adapter is removed. --- plugins/gatt-example.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/gatt-example.c b/plugins/gatt-example.c index 5af07ea8f..701c1d7e3 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); } -- 2.47.3