diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-03 06:10:27 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-03 06:10:27 +0000 |
commit | 017773401f29b879f48ca952ce963dc41259618c (patch) | |
tree | 47467b33841bb4ba9ac822e234ee2cac2218aef4 /channels/chan_phone.c | |
parent | 9895f3dbd288aaa18d4a11c95af58cee61f27325 (diff) |
ast_calloc janitor (Inspired by issue 9860)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@66981 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_phone.c')
-rw-r--r-- | channels/chan_phone.c | 6 |
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); |