--- android/gatt.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/android/gatt.c b/android/gatt.c index a7a7204..4a720cc 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -506,13 +506,11 @@ static void handle_client_unregister(const void *buf, uint16_t len) if (!cl) { error("gatt: client_if=%d not found", cmd->client_if); status = HAL_STATUS_FAILED; - goto failed; + } else { + destroy_gatt_client(cl); + status = HAL_STATUS_SUCCESS; } - destroy_gatt_client(cl); - status = HAL_STATUS_SUCCESS; - -failed: ipc_send_rsp(hal_ipc, HAL_SERVICE_ID_GATT, HAL_OP_GATT_CLIENT_UNREGISTER, status); } -- 1.8.3.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