ast_framehook_detach() must be called with the channel locked.

The framehook container could become corrupted if the channel lock is not
held before calling.

Change-Id: If0a1c7ba0484ed3a191106a7516526b905952584
This commit is contained in:
Richard Mudgett
2016-08-23 10:42:08 -05:00
parent 88e9d05ef7
commit 038cbc0215
2 changed files with 6 additions and 0 deletions

View File

@@ -641,7 +641,9 @@ static void refer_blind_callback(struct ast_channel *chan, struct transfer_chann
refer_progress_notify(notification);
}
ast_channel_lock(chan);
ast_framehook_detach(chan, refer->progress->framehook);
ast_channel_unlock(chan);
ao2_cleanup(refer->progress);
}