mirror of
https://github.com/asterisk/asterisk.git
synced 2026-05-07 13:53:50 +00:00
ast_softhangup() was locking the channel before calling ast_rtp_instance_set_stats_vars() which, if the channel was in a bridge, then locked the bridge peer channel. If another thread attempted to set bridge variables on the peer, it would lock that channel first, then this channel causing a lock inversion. ast_softhangup() now holds the channel lock while retrieving the rtp instance, then unlocks it before calling ast_rtp_instance_set_stats_vars(), then locks it again after it returns. Resolves: #1907