aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_followme.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-06 21:20:11 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-06 21:20:11 +0000
commiteb5d461ed4688cafadc76bebf329a2fae454dc12 (patch)
tree5503cb153c9de46c07e3a0a521cc996926ed375b /apps/app_followme.c
parent125558c76fd4870a9133e4974cce6410c89a3593 (diff)
Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_followme.c')
-rw-r--r--apps/app_followme.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/app_followme.c b/apps/app_followme.c
index 2e313d012..37c81d136 100644
--- a/apps/app_followme.c
+++ b/apps/app_followme.c
@@ -172,17 +172,17 @@ static void free_numbers(struct call_followme *f)
while ((prev = AST_LIST_REMOVE_HEAD(&f->numbers, entry)))
/* Free the number */
- free(prev);
+ ast_free(prev);
AST_LIST_HEAD_INIT_NOLOCK(&f->numbers);
while ((prev = AST_LIST_REMOVE_HEAD(&f->blnumbers, entry)))
/* Free the blacklisted number */
- free(prev);
+ ast_free(prev);
AST_LIST_HEAD_INIT_NOLOCK(&f->blnumbers);
while ((prev = AST_LIST_REMOVE_HEAD(&f->wlnumbers, entry)))
/* Free the whitelisted number */
- free(prev);
+ ast_free(prev);
AST_LIST_HEAD_INIT_NOLOCK(&f->wlnumbers);
}
@@ -815,7 +815,7 @@ static void findmeexec(struct fm_args *tpargs)
tmpuser = ast_calloc(1, sizeof(*tmpuser));
if (!tmpuser) {
ast_log(LOG_WARNING, "Out of memory!\n");
- free(findme_user_list);
+ ast_free(findme_user_list);
return;
}
@@ -872,7 +872,7 @@ static void findmeexec(struct fm_args *tpargs)
if (!fmuser->cleared && fmuser->ochan != winner)
clear_caller(fmuser);
AST_LIST_REMOVE_CURRENT(findme_user_list, entry);
- free(fmuser);
+ ast_free(fmuser);
}
AST_LIST_TRAVERSE_SAFE_END
fmuser = NULL;
@@ -883,7 +883,7 @@ static void findmeexec(struct fm_args *tpargs)
if (!caller) {
tpargs->status = 1;
- free(findme_user_list);
+ ast_free(findme_user_list);
return;
}
@@ -893,7 +893,7 @@ static void findmeexec(struct fm_args *tpargs)
break;
}
- free(findme_user_list);
+ ast_free(findme_user_list);
if (!winner)
tpargs->status = 1;
else {
@@ -1012,7 +1012,7 @@ static int app_exec(struct ast_channel *chan, void *data)
AST_LIST_TRAVERSE_SAFE_BEGIN(&targs.cnumbers, nm, entry) {
AST_LIST_REMOVE_CURRENT(&targs.cnumbers, entry);
- free(nm);
+ ast_free(nm);
}
AST_LIST_TRAVERSE_SAFE_END
@@ -1075,7 +1075,7 @@ static int unload_module(void)
AST_LIST_LOCK(&followmes);
while ((f = AST_LIST_REMOVE_HEAD(&followmes, entry))) {
free_numbers(f);
- free(f);
+ ast_free(f);
}
AST_LIST_UNLOCK(&followmes);