<p>George Joseph <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15621">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, approved
Benjamin Keith Ford: Looks good to me, but someone else must approve
George Joseph: Looks good to me, but someone else must approve; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">channel: Fix crash in suppress API.<br><br>There exists an inconsistency with framehook usage<br>such that it is only on reads that the frame should<br>be freed, not on writes as well.<br><br>ASTERISK-29071<br><br>Change-Id: I5ef918ebe4debac8a469e8d43bf9d6b673e8e472<br>---<br>M main/channel.c<br>1 file changed, 3 insertions(+), 1 deletion(-)<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 3d6fae6..e92eaf8 100644</span><br><span>--- a/main/channel.c</span><br><span>+++ b/main/channel.c</span><br><span>@@ -10845,7 +10845,9 @@</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(0, 100%, 40%);">- ast_frfree(frame);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (event == AST_FRAMEHOOK_EVENT_READ) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_frfree(frame);</span><br><span style="color: hsl(120, 100%, 40%);">+ }</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/+/15621">change 15621</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/+/15621"/><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: I5ef918ebe4debac8a469e8d43bf9d6b673e8e472 </div>
<div style="display:none"> Gerrit-Change-Number: 15621 </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: Benjamin Keith Ford <bford@digium.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-MessageType: merged </div>