From 88e9d05ef7de24f0169032c1ae4cacbe54be0a55 Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Mon, 22 Aug 2016 15:01:37 -0500 Subject: 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 --- main/bridge_basic.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'main/bridge_basic.c') 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; -- cgit v1.2.3