<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6169">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">channel: Fix leak on successful call to chan->tech->requester.<br><br>joint_cap needs to be released unconditionally as chan->tech->requester<br>does not steal the reference even on success.<br><br>ASTERISK-27180 #close<br><br>Change-Id: I647728992559bdb0a9c7357c20be1b36400d68b6<br>---<br>M main/channel.c<br>1 file changed, 4 insertions(+), 9 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/channel.c b/main/channel.c<br>index 6682555..632d472 100644<br>--- a/main/channel.c<br>+++ b/main/channel.c<br>@@ -6022,7 +6022,7 @@<br> const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *addr, int *cause)<br> {<br> struct chanlist *chan;<br>- struct ast_channel *c;<br>+ struct ast_channel *c = NULL;<br> int res;<br> int foo;<br> <br>@@ -6063,9 +6063,6 @@<br> c = chan->tech->requester_with_stream_topology(type, topology, assignedids, requestor, addr, cause);<br> <br> ast_stream_topology_free(tmp_converted_topology);<br>- if (!c) {<br>- return NULL;<br>- }<br> } else if (chan->tech->requester) {<br> struct ast_format_cap *tmp_converted_cap = NULL;<br> struct ast_format_cap *tmp_cap;<br>@@ -6116,12 +6113,10 @@<br> ao2_cleanup(tmp_converted_cap);<br> <br> c = chan->tech->requester(type, joint_cap, assignedids, requestor, addr, cause);<br>+ ao2_ref(joint_cap, -1);<br>+ }<br> <br>- if (!c) {<br>- ao2_ref(joint_cap, -1);<br>- return NULL;<br>- }<br>- } else {<br>+ if (!c) {<br> return NULL;<br> }<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6169">change 6169</a>. To unsubscribe, 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/6169"/><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-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I647728992559bdb0a9c7357c20be1b36400d68b6 </div>
<div style="display:none"> Gerrit-Change-Number: 6169 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>