commit d34c690e54568a1b7813202509491b75f206e8b9 Author: Linus Nordberg linus@torproject.org Date: Tue Sep 4 19:44:13 2012 +0200
Allocate vote_microdesc_hash_t using tor_malloc_zero().
In case the struct grows in the future. Shouldn't be too expensive. --- src/or/dirserv.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 09430fe..f229e59 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -2798,7 +2798,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, vote_microdesc_hash_t *h; dirvote_format_microdesc_vote_line(buf, sizeof(buf), md, cmr->low, cmr->high); - h = tor_malloc(sizeof(vote_microdesc_hash_t)); + h = tor_malloc_zero(sizeof(vote_microdesc_hash_t)); h->microdesc_hash_line = tor_strdup(buf); h->next = vrs->microdesc; vrs->microdesc = h;