summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2016-08-22 15:01:37 -0500
committerRichard Mudgett <rmudgett@digium.com>2016-08-25 17:11:17 -0500
commitfc859dfee95756250de376a35b0f128a4088a9e0 (patch)
treef3497198ca7b547799403b6a40eb47fabd78519c /main
parent5a488431857147dc8b4d8c0f9b831f629afc2b23 (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')
-rw-r--r--main/bridge_basic.c2
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;