aboutsummaryrefslogtreecommitdiffstats
path: root/cdr/cdr_tds.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 /cdr/cdr_tds.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 'cdr/cdr_tds.c')
-rw-r--r--cdr/cdr_tds.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/cdr/cdr_tds.c b/cdr/cdr_tds.c
index b4d51729a..736199a4a 100644
--- a/cdr/cdr_tds.c
+++ b/cdr/cdr_tds.c
@@ -221,16 +221,16 @@ static int tds_log(struct ast_cdr *cdr)
}
} while (!connected && !retried);
- free(accountcode);
- free(src);
- free(dst);
- free(dcontext);
- free(clid);
- free(channel);
- free(dstchannel);
- free(lastapp);
- free(lastdata);
- free(uniqueid);
+ ast_free(accountcode);
+ ast_free(src);
+ ast_free(dst);
+ ast_free(dcontext);
+ ast_free(clid);
+ ast_free(channel);
+ ast_free(dstchannel);
+ ast_free(lastapp);
+ ast_free(lastdata);
+ ast_free(uniqueid);
ast_mutex_unlock(&tds_lock);
@@ -246,7 +246,7 @@ static char *anti_injection(const char *str, int len)
char *known_bad[] = {"select", "insert", "update", "delete", "drop", ";", "--", "\0"};
int idx;
- if ((buf = malloc(len + 1)) == NULL)
+ if ((buf = ast_malloc(len + 1)) == NULL)
{
ast_log(LOG_ERROR, "cdr_tds: Out of memory error\n");
return NULL;
@@ -413,13 +413,13 @@ static int tds_unload_module(void)
ast_cdr_unregister(name);
- if (hostname) free(hostname);
- if (dbname) free(dbname);
- if (dbuser) free(dbuser);
- if (password) free(password);
- if (charset) free(charset);
- if (language) free(language);
- if (table) free(table);
+ if (hostname) ast_free(hostname);
+ if (dbname) ast_free(dbname);
+ if (dbuser) ast_free(dbuser);
+ if (password) ast_free(password);
+ if (charset) ast_free(charset);
+ if (language) ast_free(language);
+ if (table) ast_free(table);
return 0;
}