diff options
author | Richard Mudgett <rmudgett@digium.com> | 2016-08-22 15:01:37 -0500 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2016-08-25 17:11:50 -0500 |
commit | 5744f434f0eaba9633e7574d9cd0f8193dfd67e1 (patch) | |
tree | edf5d6ce291ea2840395e467c30bb4deab49970d /main/bridge_basic.c | |
parent | d2e03c252d128d43fdbfe5906e238e8e0f90c0ab (diff) |
ast_framehook_attach() must be called with the channel locked.
The framehook container could become corrupted if the channel lock is not
held before calling.
Change-Id: I1a6b957a1f7b899eb29a186915f8cccab886a438
Diffstat (limited to 'main/bridge_basic.c')
-rw-r--r-- | main/bridge_basic.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/main/bridge_basic.c b/main/bridge_basic.c index 8d7fbae70..6c411fbaf 100644 --- a/main/bridge_basic.c +++ b/main/bridge_basic.c @@ -3088,7 +3088,9 @@ static int attach_framehook(struct attended_transfer_properties *props, struct a ao2_ref(props, +1); target_interface.data = props; + ast_channel_lock(channel); props->target_framehook_id = ast_framehook_attach(channel, &target_interface); + ast_channel_unlock(channel); if (props->target_framehook_id == -1) { ao2_ref(props, -1); return -1; |