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 a1d0dac6c6)
releases/18
parent
1108f61bfb
commit
c759489d3e
Loading…
Reference in new issue