mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 04:30:28 +00:00
ast_calloc, instead of malloc and memset
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
3
udptl.c
3
udptl.c
@@ -772,9 +772,8 @@ struct ast_udptl *ast_udptl_new_with_bindaddr(struct sched_context *sched, struc
|
|||||||
int i;
|
int i;
|
||||||
long int flags;
|
long int flags;
|
||||||
|
|
||||||
if ((udptl = malloc(sizeof(struct ast_udptl))) == NULL)
|
if (!(udptl = ast_calloc(1, sizeof(*udptl))))
|
||||||
return NULL;
|
return NULL;
|
||||||
memset(udptl, 0, sizeof(struct ast_udptl));
|
|
||||||
|
|
||||||
if (udptlfectype == 2)
|
if (udptlfectype == 2)
|
||||||
udptl->error_correction_scheme = UDPTL_ERROR_CORRECTION_FEC;
|
udptl->error_correction_scheme = UDPTL_ERROR_CORRECTION_FEC;
|
||||||
|
Reference in New Issue
Block a user