]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Bridging: Use a ref to bridge_channel's channel to prevent crash. certified/13.21
authorBen Ford <bford@digium.com>
Mon, 31 Aug 2020 16:14:20 +0000 (11:14 -0500)
committerBenjamin Keith Ford <bford@digium.com>
Wed, 2 Sep 2020 14:51:35 +0000 (09:51 -0500)
commit6f0b436185707b60975fdb4981d59b5423d919dc
tree6aea7fbc2804d4c265075595366938b92a26e79d
parenta8b7b407f9a3f1c12d0aa03761cd32b550d6a140
Bridging: Use a ref to bridge_channel's channel to prevent crash.

There's a race condition with bridging where a bridge can be torn down
causing the bridge_channel's ast_channel to become NULL when it's still
needed. This particular case happened with attended transfers, but the
crash occurred when trying to publish a stasis message. Now, the
bridge_channel is locked, a ref to the ast_channel is obtained, and that
ref is passed down the chain.

Change-Id: Ic48715c0c041615d17d286790ae3e8c61bb28814
include/asterisk/bridge_channel.h
main/bridge.c
main/bridge_channel.c