<p>Joshua Colp <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15537">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Sean Bright: Looks good to me, approved
George Joseph: Looks good to me, but someone else must approve
Joshua Colp: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">channel: Fix memory leak in suppress API.<br><br>A frame suppression API exists as part of channels<br>which allows audio frames to or from a channel to<br>be dropped. The MuteAudio AMI action uses this<br>API to perform its job.<br><br>This API uses a framehook to intercept flowing<br>audio and drop it when appropriate. It is the<br>responsibility of the framehook to free the<br>frame it is given if it changes the frame. The<br>suppression API failed to do this resulting in<br>a leak of audio frames.<br><br>This change adds the freeing of these frames.<br><br>ASTERISK-29071<br><br>Change-Id: Ie50acd454d672d36af914050c327d2e120d8ba7b<br>---<br>M main/channel.c<br>1 file changed, 1 insertion(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/main/channel.c b/main/channel.c</span><br><span>index 784ea28..3d6fae6 100644</span><br><span>--- a/main/channel.c</span><br><span>+++ b/main/channel.c</span><br><span>@@ -10845,6 +10845,7 @@</span><br><span> if (suppress_frame) {</span><br><span> switch (frame->frametype) {</span><br><span> case AST_FRAME_VOICE:</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_frfree(frame);</span><br><span> frame = &ast_null_frame;</span><br><span> break;</span><br><span> default:</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15537">change 15537</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/15537"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ie50acd454d672d36af914050c327d2e120d8ba7b </div>
<div style="display:none"> Gerrit-Change-Number: 15537 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>