Skip to content
Snippets Groups Projects
Commit 674c5e9b authored by Luigi Rizzo's avatar Luigi Rizzo
Browse files

clear memory before passing to ASTOBJ_INIT

Mayne it is unnecessary, but otherwise there code believes
the mutex is already initialized.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 2b3ae249
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment