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:13:52 -0500
commit88e9d05ef7de24f0169032c1ae4cacbe54be0a55 (patch)
treeb2a200542af70b1360000a8af37e6341fe74487a /main
parent4e5b930d3fa11012513a1ba37d2cf7c0068b6407 (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 c4cf2a074..b24df0506 100644
--- a/main/bridge_basic.c
+++ b/main/bridge_basic.c
@@ -3090,7 +3090,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;