mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-23 14:44:28 +00:00
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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user