<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6890">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">hashtab: Use ast_free.<br><br>A few places in hashtab use free instead of ast_free, remove declaration<br>of ASTMM_LIBC from hashtab.c as it's no longer needed.<br><br>Change-Id: I2ff089bad71640c03c3ce97f1b00fc962ef79427<br>---<br>M main/hashtab.c<br>1 file changed, 7 insertions(+), 8 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/hashtab.c b/main/hashtab.c<br>index 3d7b199..eefe443 100644<br>--- a/main/hashtab.c<br>+++ b/main/hashtab.c<br>@@ -26,7 +26,6 @@<br> <support_level>core</support_level><br> ***/<br> <br>-#define ASTMM_LIBC ASTMM_REDIRECT<br> #include "asterisk.h"<br> <br> #include <ctype.h><br>@@ -292,7 +291,7 @@<br> ast_calloc(tab->hash_tab_size, sizeof(*(ht->array)))<br> #endif<br> )) {<br>- free(ht);<br>+ ast_free(ht);<br> return NULL;<br> }<br> <br>@@ -408,20 +407,20 @@<br> }<br> <br> tlist_del_item(&(tab->tlist), tab->tlist);<br>- free(t);<br>+ ast_free(t);<br> }<br> <br> for (i = 0; i < tab->hash_tab_size; i++) {<br> /* Not totally necessary, but best to destroy old pointers */<br> tab->array[i] = NULL;<br> }<br>- free(tab->array);<br>+ ast_free(tab->array);<br> }<br> if (tab->do_locking) {<br> ast_rwlock_unlock(&tab->lock);<br> ast_rwlock_destroy(&tab->lock);<br> }<br>- free(tab);<br>+ ast_free(tab);<br> }<br> }<br> <br>@@ -656,7 +655,7 @@<br> why leave ptrs laying around */<br> tab->array[i] = 0; /* erase old ptrs */<br> }<br>- free(tab->array);<br>+ ast_free(tab->array);<br> if (!(tab->array =<br> #ifdef __AST_DEBUG_MALLOC<br> __ast_calloc(newsize, sizeof(*(tab->array)), file, lineno, func)<br>@@ -748,7 +747,7 @@<br> return;<br> if (it->tab->do_locking)<br> ast_rwlock_unlock(&it->tab->lock);<br>- free(it);<br>+ ast_free(it);<br> }<br> <br> void *ast_hashtab_next(struct ast_hashtab_iter *it)<br>@@ -781,7 +780,7 @@<br> <br> obj2 = b->object;<br> b->object = b->next = (void*)2;<br>- free(b); /* free up the hashbucket */<br>+ ast_free(b); /* free up the hashbucket */<br> tab->hash_tab_elements--;<br> #ifdef DEBUG<br> {<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6890">change 6890</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/6890"/><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: I2ff089bad71640c03c3ce97f1b00fc962ef79427 </div>
<div style="display:none"> Gerrit-Change-Number: 6890 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.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>