diff options
author | Linus Nordberg <linus@torproject.org> | 2012-09-04 19:44:13 +0200 |
---|---|---|
committer | Linus Nordberg <linus@torproject.org> | 2012-09-04 20:19:41 +0200 |
commit | d34c690e54568a1b7813202509491b75f206e8b9 (patch) | |
tree | 17cbb946cf8bfc4bbdd3974aabb5131f793e2cf6 /src/or/dirserv.c | |
parent | 8ef395d6a918f3f216fa24d3c71b444073fe6eb0 (diff) | |
download | tor-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.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | 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 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; |