]> 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:02 +0000 (16:17 -0500)
commit1f9913f2723cbcbf6d78f4da7ee4dd4decc13c05
tree00093fea5dca50b1f15931ee0fe35962de0e8993
parent2619c04f1ea72dedf9e48d4452435d3766e5323c
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