<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6170">View Change</a></p><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, 3 insertions(+), 8 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/70/6170/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/channel.c b/main/channel.c<br>index 6682555..e6a1752 100644<br>--- a/main/channel.c<br>+++ b/main/channel.c<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/6170">change 6170</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/6170"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I647728992559bdb0a9c7357c20be1b36400d68b6 </div>
<div style="display:none"> Gerrit-Change-Number: 6170 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>