From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> 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 903afa7..0983852 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.4.3 -- 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