From: Linus Nordberg Date: Tue, 4 Sep 2012 17:44:13 +0000 (+0200) Subject: Allocate vote_microdesc_hash_t using tor_malloc_zero(). X-Git-Tag: tor-0.2.4.1-alpha~16^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d34c690e54568a1b7813202509491b75f206e8b9;p=thirdparty%2Ftor.git Allocate vote_microdesc_hash_t using tor_malloc_zero(). In case the struct grows in the future. Shouldn't be too expensive. --- diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 09430feb2a..f229e5995f 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;