From: Russell Bryant Date: Sat, 24 Jun 2006 04:03:52 +0000 (+0000) Subject: ast_calloc, instead of malloc and memset X-Git-Tag: 1.4.0-beta1~781 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7024d8a024ceeaae8f3980d0f4bf9f267662d1d;p=thirdparty%2Fasterisk.git ast_calloc, instead of malloc and memset git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35788 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/udptl.c b/udptl.c index a7c6e8a45a..86fa42b5ce 100644 --- a/udptl.c +++ b/udptl.c @@ -772,9 +772,8 @@ struct ast_udptl *ast_udptl_new_with_bindaddr(struct sched_context *sched, struc int i; long int flags; - if ((udptl = malloc(sizeof(struct ast_udptl))) == NULL) + if (!(udptl = ast_calloc(1, sizeof(*udptl)))) return NULL; - memset(udptl, 0, sizeof(struct ast_udptl)); if (udptlfectype == 2) udptl->error_correction_scheme = UDPTL_ERROR_CORRECTION_FEC;