diff options
author | Linus Nordberg <linus@torproject.org> | 2012-09-05 14:00:55 +0200 |
---|---|---|
committer | Linus Nordberg <linus@torproject.org> | 2012-09-10 00:43:48 +0200 |
commit | 93ee62297ff24fcd01f97c87d76953f4d5fb377c (patch) | |
tree | 32c4165191d427e01de4bc4e224c9631fdd7f352 /src/or/dirserv.c | |
parent | f6639d5676f34234afaec9b49c89735724f7f67e (diff) | |
download | tor-93ee62297ff24fcd01f97c87d76953f4d5fb377c.tar.gz tor-93ee62297ff24fcd01f97c87d76953f4d5fb377c.zip |
Don't follow the NULL pointer.
If dirvote_create_microdescriptor() returns NULL, don't use md.
Found by "f. tp.".
Fixes bug 6797.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 7f4690678e..e7a2623575 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -2800,9 +2800,9 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, h->microdesc_hash_line = tor_strdup(buf); h->next = vrs->microdesc; vrs->microdesc = h; + md->last_listed = now; + smartlist_add(microdescriptors, md); } - md->last_listed = now; - smartlist_add(microdescriptors, md); } smartlist_add(routerstatuses, vrs); |