aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_agent.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 /channels/chan_agent.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 '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);