]> 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:34 +0000 (16:17 -0500)
commit89aabfe10b4e732dc66110790d1dce10d26e03a8
tree20956e40f4c3132bbe7609ede8ab8d1dfb6423c2
parentadfdfdee611ee13b45be1b4c019871e62c8009af
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