summaryrefslogtreecommitdiff
path: root/channels/chan_phone.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2007-06-03 06:10:27 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2007-06-03 06:10:27 +0000
commitce9ec91897d8ddf1b26e8bb67d3dee2d482730a3 (patch)
tree47467b33841bb4ba9ac822e234ee2cac2218aef4 /channels/chan_phone.c
parentb1490716f6adf54f7282322bbee7cb04de632f23 (diff)
ast_calloc janitor (Inspired by issue 9860)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_phone.c')
-rw-r--r--channels/chan_phone.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_phone.c b/channels/chan_phone.c
index 76311fc56..31cabd4eb 100644
--- a/channels/chan_phone.c
+++ b/channels/chan_phone.c
@@ -1179,12 +1179,12 @@ static struct phone_pvt *mkif(char *iface, int mode, int txgain, int rxgain)
struct phone_pvt *tmp;
int flags;
- tmp = malloc(sizeof(struct phone_pvt));
+ tmp = ast_calloc(1, sizeof(*tmp));
if (tmp) {
tmp->fd = open(iface, O_RDWR);
if (tmp->fd < 0) {
ast_log(LOG_WARNING, "Unable to open '%s'\n", iface);
- free(tmp);
+ ast_free(tmp);
return NULL;
}
if (mode == MODE_FXO) {
@@ -1344,7 +1344,7 @@ static int __unload_module(void)
pl = p;
p = p->next;
/* Free associated memory */
- free(pl);
+ ast_free(pl);
}
iflist = NULL;
ast_mutex_unlock(&iflock);