<p>Joshua Colp has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/19671">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ari: Destroy body variables in channel create.<br><br>When passing a JSON body to the 'create' channel route<br>it would be converted into Asterisk variables, but never<br>freed resulting in a memory leak.<br><br>This change makes it so that the variables are freed in<br>all cases.<br><br>ASTERISK-30344<br><br>Change-Id: I924dbd866a01c6073e2d6fb846ccaa27ef72d49d<br>---<br>M res/ari/resource_channels.c<br>1 file changed, 19 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/71/19671/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/ari/resource_channels.c b/res/ari/resource_channels.c</span><br><span>index 71c4a14..9ee4a46 100644</span><br><span>--- a/res/ari/resource_channels.c</span><br><span>+++ b/res/ari/resource_channels.c</span><br><span>@@ -1779,7 +1779,7 @@</span><br><span> struct ast_ari_channels_create_args *args,</span><br><span> struct ast_ari_response *response)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- struct ast_variable *variables = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ RAII_VAR(struct ast_variable *, variables, NULL, ast_variables_destroy);</span><br><span> struct ast_assigned_ids assignedids;</span><br><span> struct ari_channel_thread_data *chan_data;</span><br><span> struct ast_channel_snapshot *snapshot;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/19671">change 19671</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/+/19671"/><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: I924dbd866a01c6073e2d6fb846ccaa27ef72d49d </div>
<div style="display:none"> Gerrit-Change-Number: 19671 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>