summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@torproject.org>2012-09-04 19:44:13 +0200
committerLinus Nordberg <linus@torproject.org>2012-09-04 20:19:41 +0200
commitd34c690e54568a1b7813202509491b75f206e8b9 (patch)
tree17cbb946cf8bfc4bbdd3974aabb5131f793e2cf6
parent8ef395d6a918f3f216fa24d3c71b444073fe6eb0 (diff)
downloadtor-d34c690e54568a1b7813202509491b75f206e8b9.tar.gz
tor-d34c690e54568a1b7813202509491b75f206e8b9.zip
Allocate vote_microdesc_hash_t using tor_malloc_zero().
In case the struct grows in the future. Shouldn't be too expensive.
-rw-r--r--src/or/dirserv.c2
1 files changed, 1 insertions, 1 deletions
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;