Commit fdc0a660 authored by mfrw's avatar mfrw Committed by Nick Mathewson
Browse files

dircollate: Use correct tor_calloc args.



Flip the tor_calloc arguments in the call.

Signed-off-by: mfrw's avatarMuhammad Falak R Wani <falakreyaz@gmail.com>
parent 68450051
...@@ -87,7 +87,7 @@ dircollator_add_routerstatus(dircollator_t *dc, ...@@ -87,7 +87,7 @@ dircollator_add_routerstatus(dircollator_t *dc,
(void) vote; (void) vote;
vote_routerstatus_t **vrs_lst = digestmap_get(dc->by_rsa_sha1, id); vote_routerstatus_t **vrs_lst = digestmap_get(dc->by_rsa_sha1, id);
if (NULL == vrs_lst) { if (NULL == vrs_lst) {
vrs_lst = tor_calloc(sizeof(vote_routerstatus_t *), dc->n_votes); vrs_lst = tor_calloc(dc->n_votes, sizeof(vote_routerstatus_t *));
digestmap_set(dc->by_rsa_sha1, id, vrs_lst); digestmap_set(dc->by_rsa_sha1, id, vrs_lst);
} }
tor_assert(vrs_lst[vote_num] == NULL); tor_assert(vrs_lst[vote_num] == NULL);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment