diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-06-06 21:20:11 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-06-06 21:20:11 +0000 |
commit | 9d05ff8ed5f2c898370896ff7a8bb67885596ba1 (patch) | |
tree | 5503cb153c9de46c07e3a0a521cc996926ed375b /main/udptl.c | |
parent | 033a3df22aa68f04327066e0567b76f73c437651 (diff) |
Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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) |