mirror of https://github.com/asterisk/asterisk
bridge_basic.c: Make sure that ast_bridge_channel is not destroyed while iterating over bridge->channels.
From the gdb information, we can see that while iterating over bridge->channels, the ast_bridge_channel reference count is 0, indicating it has already been destroyed.Additionally, when ast_bridge_channel is removed from bridge->channels, the bridge is first locked. Therefore, locking the bridge before iterating over bridge->channels can resolve the race condition.
Resolves: https://github.com/asterisk/asterisk/issues/768
(cherry picked from commit 68a9c5683a
)
releases/21
parent
8a09a6ca6d
commit
12193c70de
Loading…
Reference in new issue