diff options
author | Roger Dingledine <arma@torproject.org> | 2017-05-25 00:27:27 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2017-05-25 00:27:27 -0400 |
commit | 83439e78cc08f5a05d314de4409e69aa6d1601d7 (patch) | |
tree | 26f9ba9d65c82f70bb775c0ffecea4d3b354449c /src | |
parent | 5c52d3c2c05a42c9535789d335a51f09a7855d68 (diff) | |
parent | ec61ae59a5d009a9e80f3bfa9a2aa5f5dfa05551 (diff) | |
download | tor-83439e78cc08f5a05d314de4409e69aa6d1601d7.tar.gz tor-83439e78cc08f5a05d314de4409e69aa6d1601d7.zip |
Merge branch 'maint-0.2.9' into maint-0.3.0
Diffstat (limited to 'src')
-rw-r--r-- | src/or/dirserv.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 990242861c..250170cbef 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -626,7 +626,11 @@ dirserv_add_multiple_descriptors(const char *desc, uint8_t purpose, * passed back to the origin of this descriptor, or NULL if there is no such * message. Use <b>source</b> to produce better log messages. * - * Return the status of the operation + * If <b>ri</b> is not added to the list of server descriptors, free it. + * That means the caller must not access <b>ri</b> after this function + * returns, since it might have been freed. + * + * Return the status of the operation. * * This function is only called when fresh descriptors are posted, not when * we re-load the cache. @@ -699,6 +703,7 @@ dirserv_add_descriptor(routerinfo_t *ri, const char **msg, const char *source) "its key did not match an older RSA/Ed25519 keypair", router_describe(ri), source); *msg = "Looks like your keypair does not match its older value."; + routerinfo_free(ri); return ROUTER_AUTHDIR_REJECTS; } |