<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6891">View Change</a></p><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(+), 7 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/91/6891/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/hashtab.c b/main/hashtab.c<br>index d06d1e1..9aec9ac 100644<br>--- a/main/hashtab.c<br>+++ b/main/hashtab.c<br>@@ -293,7 +293,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>@@ -409,20 +409,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>@@ -657,7 +657,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>@@ -749,7 +749,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>@@ -782,7 +782,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/6891">change 6891</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/6891"/><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: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I2ff089bad71640c03c3ce97f1b00fc962ef79427 </div>
<div style="display:none"> Gerrit-Change-Number: 6891 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>