diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-06 21:20:11 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-06 21:20:11 +0000 |
commit | eb5d461ed4688cafadc76bebf329a2fae454dc12 (patch) | |
tree | 5503cb153c9de46c07e3a0a521cc996926ed375b /main/udptl.c | |
parent | 125558c76fd4870a9133e4974cce6410c89a3593 (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 'main/udptl.c')
-rw-r--r-- | main/udptl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/main/udptl.c b/main/udptl.c index d255f9375..34b5b872f 100644 --- a/main/udptl.c +++ b/main/udptl.c @@ -824,7 +824,7 @@ struct ast_udptl *ast_udptl_new_with_bindaddr(struct sched_context *sched, struc udptl->us.sin_family = AF_INET; if ((udptl->fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { - free(udptl); + ast_free(udptl); ast_log(LOG_WARNING, "Unable to allocate socket: %s\n", strerror(errno)); return NULL; } @@ -845,7 +845,7 @@ struct ast_udptl *ast_udptl_new_with_bindaddr(struct sched_context *sched, struc if (errno != EADDRINUSE) { ast_log(LOG_WARNING, "Unexpected bind error: %s\n", strerror(errno)); close(udptl->fd); - free(udptl); + ast_free(udptl); return NULL; } if (++x > udptlend) @@ -853,7 +853,7 @@ struct ast_udptl *ast_udptl_new_with_bindaddr(struct sched_context *sched, struc if (x == startplace) { ast_log(LOG_WARNING, "No UDPTL ports remaining\n"); close(udptl->fd); - free(udptl); + ast_free(udptl); return NULL; } } @@ -908,7 +908,7 @@ void ast_udptl_destroy(struct ast_udptl *udptl) ast_io_remove(udptl->io, udptl->ioid); if (udptl->fd > -1) close(udptl->fd); - free(udptl); + ast_free(udptl); } int ast_udptl_write(struct ast_udptl *s, struct ast_frame *f) |