From 9b6a3e36b7e86420891ae27d9c564c16b73b96e6 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 8 Sep 2015 14:09:39 +0300 Subject: [PATCH] shared/gatt-client: Fix not freeing notify data notify_data_write_ccc takes another reference in case it succeed so the original reference should be dropped to cause the data to be freed once notify_data_write_ccc completes. --- src/shared/gatt-client.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c index 903afa760..098385298 100644 --- a/src/shared/gatt-client.c +++ b/src/shared/gatt-client.c @@ -1596,8 +1596,7 @@ static void complete_unregister_notify(void *data) !notify_data->chrc->ccc_handle) goto done; - if (notify_data_write_ccc(notify_data, false, disable_ccc_callback)) - return; + notify_data_write_ccc(notify_data, false, disable_ccc_callback); done: notify_data_unref(notify_data); -- 2.47.3