channel: Fix crash in suppress API.
There exists an inconsistency with framehook usage such that it is only on reads that the frame should be freed, not on writes as well. ASTERISK-29071 Change-Id: I5ef918ebe4debac8a469e8d43bf9d6b673e8e472
This commit is contained in:
parent
41389bfdbd
commit
cc127a999c
|
@ -10845,7 +10845,9 @@ static struct ast_frame *suppress_framehook_event_cb(struct ast_channel *chan, s
|
||||||
if (suppress_frame) {
|
if (suppress_frame) {
|
||||||
switch (frame->frametype) {
|
switch (frame->frametype) {
|
||||||
case AST_FRAME_VOICE:
|
case AST_FRAME_VOICE:
|
||||||
|
if (event == AST_FRAMEHOOK_EVENT_READ) {
|
||||||
ast_frfree(frame);
|
ast_frfree(frame);
|
||||||
|
}
|
||||||
frame = &ast_null_frame;
|
frame = &ast_null_frame;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue