From b43b81d953a5a9e25bda84f81b45c2515c7eb4af Mon Sep 17 00:00:00 2001 From: "Joshua C. Colp" Date: Wed, 3 Mar 2021 09:32:22 -0400 Subject: [PATCH] channel: Fix memory leak in suppress API. A frame suppression API exists as part of channels which allows audio frames to or from a channel to be dropped. The MuteAudio AMI action uses this API to perform its job. This API uses a framehook to intercept flowing audio and drop it when appropriate. It is the responsibility of the framehook to free the frame it is given if it changes the frame. The suppression API failed to do this resulting in a leak of audio frames. This change adds the freeing of these frames. ASTERISK-29071 Change-Id: Ie50acd454d672d36af914050c327d2e120d8ba7b --- main/channel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main/channel.c b/main/channel.c index 784ea28447..3d6fae64d3 100644 --- a/main/channel.c +++ b/main/channel.c @@ -10845,6 +10845,7 @@ static struct ast_frame *suppress_framehook_event_cb(struct ast_channel *chan, s if (suppress_frame) { switch (frame->frametype) { case AST_FRAME_VOICE: + ast_frfree(frame); frame = &ast_null_frame; break; default: -- 2.47.2