Ble: fix null-ptr dereference in bt_change_profile (#3110)

This commit is contained in:
あく 2023-09-26 13:09:17 +09:00 committed by GitHub
parent a6bb9698ef
commit c924693a84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -359,13 +359,13 @@ static void bt_change_profile(Bt* bt, BtMessage* message) {
*message->result = false;
}
}
api_lock_unlock(message->lock);
if(message->lock) api_lock_unlock(message->lock);
}
static void bt_close_connection(Bt* bt, BtMessage* message) {
bt_close_rpc_connection(bt);
furi_hal_bt_stop_advertising();
api_lock_unlock(message->lock);
if(message->lock) api_lock_unlock(message->lock);
}
int32_t bt_srv(void* p) {