[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] dircollate: Use correct tor_calloc args.



commit fdc0a660b476fea19d8b4f7739aba05704d25bbe
Author: Muhammad Falak R Wani <falakreyaz@xxxxxxxxx>
Date:   Wed Oct 5 01:32:58 2016 +0530

    dircollate: Use correct tor_calloc args.
    
    Flip the tor_calloc arguments in the call.
    
    Signed-off-by: Muhammad Falak R Wani <falakreyaz@xxxxxxxxx>
---
 src/or/dircollate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/or/dircollate.c b/src/or/dircollate.c
index 756011b..c6afd95 100644
--- a/src/or/dircollate.c
+++ b/src/or/dircollate.c
@@ -87,7 +87,7 @@ dircollator_add_routerstatus(dircollator_t *dc,
   (void) vote;
   vote_routerstatus_t **vrs_lst = digestmap_get(dc->by_rsa_sha1, id);
   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);
   }
   tor_assert(vrs_lst[vote_num] == NULL);

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits