<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6509">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Richard Mudgett: 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;">res_calendar: Plug memory leak and micro-optimization<br><br>ast_variables_destroy is NULL safe, so there is no need to check its<br>argument before passing it.<br><br>ASTERISK-25524 #close<br>Reported by: Jesper<br><br>Change-Id: Ib0f8057642e9d471960f1a79fd42e5a3ce587d3b<br>---<br>M res/res_calendar.c<br>M res/res_calendar_caldav.c<br>2 files changed, 2 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_calendar.c b/res/res_calendar.c<br>index bf385db..3369f38 100644<br>--- a/res/res_calendar.c<br>+++ b/res/res_calendar.c<br>@@ -339,10 +339,7 @@<br> }<br> ast_calendar_clear_events(cal);<br> ast_string_field_free_memory(cal);<br>- if (cal->vars) {<br>- ast_variables_destroy(cal->vars);<br>- cal->vars = NULL;<br>- }<br>+ ast_variables_destroy(cal->vars);<br> ao2_ref(cal->events, -1);<br> ao2_unlock(cal);<br> }<br>diff --git a/res/res_calendar_caldav.c b/res/res_calendar_caldav.c<br>index b6822b0..248c80e 100644<br>--- a/res/res_calendar_caldav.c<br>+++ b/res/res_calendar_caldav.c<br>@@ -78,6 +78,7 @@<br> if (pvt->session) {<br> ne_session_destroy(pvt->session);<br> }<br>+ ne_uri_free(&pvt->uri);<br> ast_string_field_free_memory(pvt);<br> <br> ao2_callback(pvt->events, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL, NULL);<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6509">change 6509</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/6509"/><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: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ib0f8057642e9d471960f1a79fd42e5a3ce587d3b </div>
<div style="display:none"> Gerrit-Change-Number: 6509 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.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>
<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>