aboutsummaryrefslogtreecommitdiffstats
path: root/netsock.c
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-09 16:19:24 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-09 16:19:24 +0000
commit9a07e634fda5a8805e32953516a6271b1fb73904 (patch)
tree6b2bb069d03a9d7905821685b917077cc8999477 /netsock.c
parent7f262e2888c96c813900b779ab714562dabd6cb6 (diff)
clear memory before passing to ASTOBJ_INIT
Mayne it is unnecessary, but otherwise there code believes the mutex is already initialized. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@26166 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'netsock.c')
-rw-r--r--netsock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/netsock.c b/netsock.c
index 4d504cb29..a7799e967 100644
--- a/netsock.c
+++ b/netsock.c
@@ -149,7 +149,7 @@ struct ast_netsock *ast_netsock_bindaddr(struct ast_netsock_list *list, struct i
if (setsockopt(netsocket, IPPROTO_IP, IP_TOS, &tos, sizeof(tos)))
ast_log(LOG_WARNING, "Unable to set TOS to %d\n", tos);
- ns = malloc(sizeof(struct ast_netsock));
+ ns = ast_calloc(1, sizeof(struct ast_netsock));
if (ns) {
/* Establish I/O callback for socket read */
ioref = ast_io_add(ioc, netsocket, callback, AST_IO_IN, ns);