]> git.ipfire.org Git - thirdparty/asterisk.git/commit
core_local: local channel data not being properly unref'ed and unlocked
authorKevin Harwell <kharwell@digium.com>
Tue, 20 Jun 2017 20:41:14 +0000 (15:41 -0500)
committerKevin Harwell <kharwell@digium.com>
Wed, 21 Jun 2017 21:17:25 +0000 (16:17 -0500)
commite733df06cbeb9858f25b961005651f0ca96c8cf2
tree0990276f68ecf2d3e672dbd641c77ba9e7eb2d70
parent9d42be930b1c63f9da20cc686370deab84b895aa
core_local: local channel data not being properly unref'ed and unlocked

In an earlier version of Asterisk a local channel [un]lock all functions were
added in order to keep a crash from occurring when a channel hung up too early
during an attended transfer. Unfortunately, when a transfer failure occurs and
depending on the timing, the local channels sometime do not get properly
unlocked and deref'ed after being locked and ref'ed. This happens because the
underlying local channel structure gets NULLed out before unlocking.

This patch reworks those [un]lock functions and makes sure the values that get
locked and ref'ed later get unlocked and deref'ed.

ASTERISK-27074 #close

Change-Id: Ice96653e29bd9d6674ed5f95feb6b448ab148b09
include/asterisk/core_local.h
main/bridge.c
main/core_local.c