Commit: 7fcd6889fb13858e3f78e9d5e35ffd80d8e0accb
Parent: 918c73acb778e2359abcf5c3fa4c6528164b3910
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2022-11-15 21:22:39
Tree: 2abf7f1ec22a0dcd075a87307cb5fc40f31b26d5

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.

Diffstat

M src/shared/bap.c | 11 ++++++++++-

1 files changed, 10 insertions(+), 1 deletions(-)

View Full Diff | Patch