<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/7649">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Sean Bright: Looks good to me, but someone else must approve
Richard Mudgett: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">chan_sip: Fix memory leaks.<br><br>In change_redirecting_information variables we use ast_strlen_zero to<br>see if a value should be saved. In the case where the value is not NULL<br>but is a zero length string we leaked.<br><br>handle_response_subscribe leaked a reference to the ccss monitor<br>instance.<br><br>Change-Id: Ib11444de69c3d5b2360a88ba2feb54d2c2e9f05f<br>---<br>M channels/chan_sip.c<br>1 file changed, 10 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/channels/chan_sip.c b/channels/chan_sip.c<br>index 522e9d1..e6e82db 100644<br>--- a/channels/chan_sip.c<br>+++ b/channels/chan_sip.c<br>@@ -23168,6 +23168,8 @@<br> redirecting->from.number.valid = 1;<br> ast_free(redirecting->from.number.str);<br> redirecting->from.number.str = redirecting_from_number;<br>+ } else {<br>+ ast_free(redirecting_from_number);<br> }<br> if (!ast_strlen_zero(redirecting_from_name)) {<br> ast_debug(3, "Got redirecting from name %s\n", redirecting_from_name);<br>@@ -23175,6 +23177,8 @@<br> redirecting->from.name.valid = 1;<br> ast_free(redirecting->from.name.str);<br> redirecting->from.name.str = redirecting_from_name;<br>+ } else {<br>+ ast_free(redirecting_from_name);<br> }<br> if (!ast_strlen_zero(p->cid_tag)) {<br> ast_free(redirecting->from.tag);<br>@@ -23188,13 +23192,17 @@<br> redirecting->to.number.valid = 1;<br> ast_free(redirecting->to.number.str);<br> redirecting->to.number.str = redirecting_to_number;<br>+ } else {<br>+ ast_free(redirecting_to_number);<br> }<br> if (!ast_strlen_zero(redirecting_to_name)) {<br>- ast_debug(3, "Got redirecting to name %s\n", redirecting_from_number);<br>+ ast_debug(3, "Got redirecting to name %s\n", redirecting_to_name);<br> update_redirecting->to.name = 1;<br> redirecting->to.name.valid = 1;<br> ast_free(redirecting->to.name.str);<br> redirecting->to.name.str = redirecting_to_name;<br>+ } else {<br>+ ast_free(redirecting_to_name);<br> }<br> redirecting->reason.code = reason;<br> ast_free(redirecting->reason.str);<br>@@ -24223,6 +24231,7 @@<br> ast_cc_monitor_failed(monitor_instance->core_id,<br> monitor_instance->device_name,<br> "Received error response to our SUBSCRIBE");<br>+ ao2_ref(monitor_instance, -1);<br> }<br> return;<br> }<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7649">change 7649</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/7649"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ib11444de69c3d5b2360a88ba2feb54d2c2e9f05f </div>
<div style="display:none"> Gerrit-Change-Number: 7649 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </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: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>