summaryrefslogtreecommitdiff
path: root/apps/app_followme.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2007-06-06 21:20:11 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2007-06-06 21:20:11 +0000
commit9d05ff8ed5f2c898370896ff7a8bb67885596ba1 (patch)
tree5503cb153c9de46c07e3a0a521cc996926ed375b /apps/app_followme.c
parent033a3df22aa68f04327066e0567b76f73c437651 (diff)
Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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);