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/rtp.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/rtp.c')
-rw-r--r-- | main/rtp.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/main/rtp.c b/main/rtp.c index 1ae1edc1b..617136b55 100644 --- a/main/rtp.c +++ b/main/rtp.c @@ -1936,7 +1936,7 @@ static struct ast_rtcp *ast_rtcp_new(void) rtcp->them.sin_family = AF_INET; if (rtcp->s < 0) { - free(rtcp); + ast_free(rtcp); ast_log(LOG_WARNING, "Unable to allocate RTCP socket: %s\n", strerror(errno)); return NULL; } @@ -1977,7 +1977,7 @@ struct ast_rtp *ast_rtp_new_with_bindaddr(struct sched_context *sched, struct io rtp->s = rtp_socket(); if (rtp->s < 0) { - free(rtp); + ast_free(rtp); ast_log(LOG_ERROR, "Unable to allocate socket: %s\n", strerror(errno)); return NULL; } @@ -2017,9 +2017,9 @@ struct ast_rtp *ast_rtp_new_with_bindaddr(struct sched_context *sched, struct io close(rtp->s); if (rtp->rtcp) { close(rtp->rtcp->s); - free(rtp->rtcp); + ast_free(rtp->rtcp); } - free(rtp); + ast_free(rtp); return NULL; } /* The port was used, increment it (by two). */ @@ -2035,9 +2035,9 @@ struct ast_rtp *ast_rtp_new_with_bindaddr(struct sched_context *sched, struct io close(rtp->s); if (rtp->rtcp) { close(rtp->rtcp->s); - free(rtp->rtcp); + ast_free(rtp->rtcp); } - free(rtp); + ast_free(rtp); return NULL; } } @@ -2204,13 +2204,13 @@ void ast_rtp_destroy(struct ast_rtp *rtp) if (rtp->rtcp->schedid > 0) ast_sched_del(rtp->sched, rtp->rtcp->schedid); close(rtp->rtcp->s); - free(rtp->rtcp); + ast_free(rtp->rtcp); rtp->rtcp=NULL; } #ifdef P2P_INTENSE ast_mutex_destroy(&rtp->bridge_lock); #endif - free(rtp); + ast_free(rtp); } static unsigned int calc_txstamp(struct ast_rtp *rtp, struct timeval *delivery) |