<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6290">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
Richard Mudgett: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_smdi: Clean up memory leak<br><br>Change-Id: I1e33290929e1aa7c5b9cb513f8254f2884974de8<br>---<br>M res/res_smdi.c<br>1 file changed, 4 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_smdi.c b/res/res_smdi.c<br>index 225a491..3f779af 100644<br>--- a/res/res_smdi.c<br>+++ b/res/res_smdi.c<br>@@ -610,12 +610,11 @@<br> <br> ast_debug(1, "Read a 'D' ... it's an MD message.\n");<br> <br>- if (!(md_msg = ast_calloc(1, sizeof(*md_msg)))) {<br>+ md_msg = ao2_alloc(sizeof(*md_msg), NULL);<br>+ if (!md_msg) {<br> ao2_ref(iface, -1);<br> return NULL;<br> }<br>-<br>- md_msg = ao2_alloc(sizeof(*md_msg), NULL);<br> <br> /* read the message desk number */<br> for (i = 0; i < sizeof(md_msg->mesg_desk_num) - 1; i++) {<br>@@ -712,12 +711,11 @@<br> <br> ast_debug(1, "Read a 'W', it's an MWI message. (No more debug coming for MWI messages)\n");<br> <br>- if (!(mwi_msg = ast_calloc(1, sizeof(*mwi_msg)))) {<br>+ mwi_msg = ao2_alloc(sizeof(*mwi_msg), NULL);<br>+ if (!mwi_msg) {<br> ao2_ref(iface, -1);<br> return NULL;<br> }<br>-<br>- mwi_msg = ao2_alloc(sizeof(*mwi_msg), NULL);<br> <br> /* discard the 'I' (from 'MWI') */<br> fgetc(iface->file);<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6290">change 6290</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/6290"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 14 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I1e33290929e1aa7c5b9cb513f8254f2884974de8 </div>
<div style="display:none"> Gerrit-Change-Number: 6290 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.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>