aboutsummaryrefslogtreecommitdiffstats
path: root/translate.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-29 04:09:31 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-29 04:09:31 +0000
commit0d6061a5c6c5187e00f374d11196d77b6e3383cb (patch)
tree9794eb2d0cd1160dc5334d0d03d7a18bc4c1a5ca /translate.c
parent3353340cebcc9bcaa12e211a47c2f94d119d50a3 (diff)
conversion from malloc to ast_malloc
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@16006 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'translate.c')
-rw-r--r--translate.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/translate.c b/translate.c
index 1ebbc1ff6..69a2a2b59 100644
--- a/translate.c
+++ b/translate.c
@@ -110,7 +110,7 @@ struct ast_trans_pvt *ast_translator_build_path(int dest, int source)
source = powerof(source);
dest = powerof(dest);
- while(source != dest) {
+ while (source != dest) {
if (!tr_matrix[source][dest].step) {
/* We shouldn't have allocated any memory */
ast_log(LOG_WARNING, "No translator path from %s to %s\n",
@@ -119,13 +119,12 @@ struct ast_trans_pvt *ast_translator_build_path(int dest, int source)
}
if (tmp) {
- tmp->next = malloc(sizeof(*tmp));
+ tmp->next = ast_malloc(sizeof(*tmp));
tmp = tmp->next;
} else
- tmp = malloc(sizeof(*tmp));
+ tmp = ast_malloc(sizeof(*tmp));
if (!tmp) {
- ast_log(LOG_WARNING, "Out of memory\n");
if (tmpr)
ast_translator_free_path(tmpr);
return NULL;