summaryrefslogtreecommitdiff
path: root/channels/chan_agent.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 /channels/chan_agent.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 'channels/chan_agent.c')
-rw-r--r--channels/chan_agent.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index 603b45482..739c35dd1 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -378,7 +378,7 @@ static int agent_cleanup(struct agent_pvt *p)
if (p->dead) {
ast_mutex_destroy(&p->lock);
ast_mutex_destroy(&p->app_lock);
- free(p);
+ ast_free(p);
}
return 0;
}
@@ -810,7 +810,7 @@ static int agent_hangup(struct ast_channel *ast)
} else if (p->dead) {
ast_mutex_destroy(&p->lock);
ast_mutex_destroy(&p->app_lock);
- free(p);
+ ast_free(p);
} else {
if (p->chan) {
/* Not dead -- check availability now */
@@ -1136,7 +1136,7 @@ static int read_agent_config(void)
if (!p->chan) {
ast_mutex_destroy(&p->lock);
ast_mutex_destroy(&p->app_lock);
- free(p);
+ ast_free(p);
} else {
/* Cause them to hang up */
ast_softhangup(p->chan, AST_SOFTHANGUP_EXPLICIT);
@@ -2118,7 +2118,7 @@ static int __login_exec(struct ast_channel *chan, void *data, int callbackmode)
if (p->dead && !p->owner) {
ast_mutex_destroy(&p->lock);
ast_mutex_destroy(&p->app_lock);
- free(p);
+ ast_free(p);
}
}
else {
@@ -2531,7 +2531,7 @@ static int unload_module(void)
while ((p = AST_LIST_REMOVE_HEAD(&agents, list))) {
if (p->owner)
ast_softhangup(p->owner, AST_SOFTHANGUP_APPUNLOAD);
- free(p);
+ ast_free(p);
}
AST_LIST_UNLOCK(&agents);
AST_LIST_HEAD_DESTROY(&agents);