commit c3b78ecc086674ea6d62c9239aa96ee4f8bffe3a from: Stefan Sperling date: Wed Nov 07 07:24:04 2018 UTC no need to zero tree during allocation in got_privsep_recv_tree() commit - 291624d8a1602266271eb5d0804ce93543794712 commit + c3b78ecc086674ea6d62c9239aa96ee4f8bffe3a blob - 9bc60855fbf938517cc6eece6ea579916a665d3b blob + 43c618f77945763e50aba3cf395284d36a9b45f6 --- lib/privsep.c +++ lib/privsep.c @@ -710,13 +710,14 @@ get_more: break; } itree = imsg.data; - *tree = calloc(1, sizeof(**tree)); + *tree = malloc(sizeof(**tree)); if (*tree == NULL) { err = got_error_from_errno(); break; } (*tree)->entries.nentries = itree->nentries; SIMPLEQ_INIT(&(*tree)->entries.head); + (*tree)->refcnt = 0; break; case GOT_IMSG_TREE_ENTRY: /* This message should be preceeded by GOT_IMSG_TREE. */