Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shared/bap: Fix crash when canceling requests
If bt_bap_unref/bap_free is called while there is an ongoing pending request it may endup calling into bap_notify_ready which will try to notify ready callbacks while holding a reference, but in case the reference is already 0 that means it would switch to 1 and back 0 causing a double free. To prevent that bap_notify_ready now checks that the reference is not 0 with use of bt_bap_ref_safe.
- Loading branch information