Skip to content
Snippets Groups Projects
Commit aecb5cb8 authored by rswindell's avatar rswindell
Browse files

Zero-initialize the allocated subscan array.

parent ad78a8e7
Branches
Tags
No related merge requests found
......@@ -425,7 +425,7 @@ js_login(JSContext *cx, uintN argc, jsval *arglist)
putuserdat(&scfg,&client->user);
if(client->subscan==NULL) {
client->subscan=(subscan_t*)malloc(sizeof(subscan_t)*scfg.total_subs);
client->subscan=(subscan_t*)calloc(scfg.total_subs, sizeof(subscan_t));
if(client->subscan==NULL)
lprintf(LOG_CRIT,"!MALLOC FAILURE");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment