summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/Makefile6
-rw-r--r--main/hashtab.c15
2 files changed, 7 insertions, 14 deletions
diff --git a/main/Makefile b/main/Makefile
index e64aace26..968f74658 100644
--- a/main/Makefile
+++ b/main/Makefile
@@ -142,12 +142,6 @@ endif
ast_expr2f.o: _ASTCFLAGS+=-Wno-unused
cdr.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
-testexpr2: ast_expr2f.c ast_expr2.c ast_expr2.h
- $(CC) -g -c -Iinclude -DSTANDALONE ast_expr2f.c
- $(CC) -g -c -Iinclude -DSTANDALONE ast_expr2.c
- $(CC) -g -o testexpr2 ast_expr2f.o ast_expr2.o -lm
- rm ast_expr2.o ast_expr2f.o
-
ifneq ($(LIBEDIT_INTERNAL),no)
LIBEDIT_OBJ=editline/libedit.a
LIBEDIT_INCLUDE=-I. -Ieditline
diff --git a/main/hashtab.c b/main/hashtab.c
index 3d7b1991c..eefe44304 100644
--- a/main/hashtab.c
+++ b/main/hashtab.c
@@ -26,7 +26,6 @@
<support_level>core</support_level>
***/
-#define ASTMM_LIBC ASTMM_REDIRECT
#include "asterisk.h"
#include <ctype.h>
@@ -292,7 +291,7 @@ struct ast_hashtab *ast_hashtab_dup(struct ast_hashtab *tab, void *(*obj_dup_fun
ast_calloc(tab->hash_tab_size, sizeof(*(ht->array)))
#endif
)) {
- free(ht);
+ ast_free(ht);
return NULL;
}
@@ -408,20 +407,20 @@ void ast_hashtab_destroy(struct ast_hashtab *tab, void (*objdestroyfunc)(void *o
}
tlist_del_item(&(tab->tlist), tab->tlist);
- free(t);
+ ast_free(t);
}
for (i = 0; i < tab->hash_tab_size; i++) {
/* Not totally necessary, but best to destroy old pointers */
tab->array[i] = NULL;
}
- free(tab->array);
+ ast_free(tab->array);
}
if (tab->do_locking) {
ast_rwlock_unlock(&tab->lock);
ast_rwlock_destroy(&tab->lock);
}
- free(tab);
+ ast_free(tab);
}
}
@@ -656,7 +655,7 @@ static void ast_hashtab_resize(struct ast_hashtab *tab)
why leave ptrs laying around */
tab->array[i] = 0; /* erase old ptrs */
}
- free(tab->array);
+ ast_free(tab->array);
if (!(tab->array =
#ifdef __AST_DEBUG_MALLOC
__ast_calloc(newsize, sizeof(*(tab->array)), file, lineno, func)
@@ -748,7 +747,7 @@ void ast_hashtab_end_traversal(struct ast_hashtab_iter *it)
return;
if (it->tab->do_locking)
ast_rwlock_unlock(&it->tab->lock);
- free(it);
+ ast_free(it);
}
void *ast_hashtab_next(struct ast_hashtab_iter *it)
@@ -781,7 +780,7 @@ static void *ast_hashtab_remove_object_internal(struct ast_hashtab *tab, struct
obj2 = b->object;
b->object = b->next = (void*)2;
- free(b); /* free up the hashbucket */
+ ast_free(b); /* free up the hashbucket */
tab->hash_tab_elements--;
#ifdef DEBUG
{