]> git.ipfire.org Git - thirdparty/asterisk.git/commit
channel: Fix memory leak in suppress API.
authorJoshua C. Colp <jcolp@sangoma.com>
Wed, 3 Mar 2021 13:32:22 +0000 (09:32 -0400)
committerJoshua Colp <jcolp@sangoma.com>
Wed, 3 Mar 2021 16:15:03 +0000 (10:15 -0600)
commitb43b81d953a5a9e25bda84f81b45c2515c7eb4af
tree95b63b029029503b37f735e07b787428266f5ae8
parentdf8d335ad1bfd21f1154010ae4b60f596b80952a
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