]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Bridging: Use a ref to bridge_channel's channel to prevent crash.
authorBen Ford <bford@digium.com>
Mon, 31 Aug 2020 16:14:20 +0000 (11:14 -0500)
committerJoshua Colp <jcolp@sangoma.com>
Thu, 10 Sep 2020 10:55:56 +0000 (05:55 -0500)
commit80a609fcce1d89bbd50f22ffbf54cf4d8c7156fa
tree403f25997302e81d98544bc03de3af4d29ffbef6
parentf8fe20eb9f8708479da96862d141826bb651833d
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