aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-01-23 20:46:57 -0500
committerNick Mathewson <nickm@torproject.org>2010-01-23 20:46:57 -0500
commit3b4b6009a0020fb55fcb6464cc448e244680f9c8 (patch)
treefb5324e3a40e089f3c204e315409b587e1fab4b1 /src/or
parent2309d0caae3f53adf4f0b8d76785cb058e900e79 (diff)
parentaec4aea19045fa9fe1c80bd032bb97ad06bbf44e (diff)
downloadtor-3b4b6009a0020fb55fcb6464cc448e244680f9c8.tar.gz
tor-3b4b6009a0020fb55fcb6464cc448e244680f9c8.zip
Merge remote branch 'origin/maint-0.2.1'
Diffstat (limited to 'src/or')
-rw-r--r--src/or/router.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/router.c b/src/or/router.c
index e14f237728..827df0302c 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1382,6 +1382,7 @@ router_rebuild_descriptor(int force)
if (extrainfo_dump_to_string(ei->cache_info.signed_descriptor_body,
ei_size, ei, get_identity_key()) < 0) {
log_warn(LD_BUG, "Couldn't generate extra-info descriptor.");
+ routerinfo_free(ri);
extrainfo_free(ei);
return -1;
}
@@ -1398,6 +1399,8 @@ router_rebuild_descriptor(int force)
if (router_dump_router_to_string(ri->cache_info.signed_descriptor_body, 8192,
ri, get_identity_key())<0) {
log_warn(LD_BUG, "Couldn't generate router descriptor.");
+ routerinfo_free(ri);
+ extrainfo_free(ei);
return -1;
}
ri->cache_info.signed_descriptor_len =
@@ -1984,6 +1987,7 @@ extrainfo_dump_to_string(char *s, size_t maxlen, extrainfo_t *extrainfo,
log_err(LD_BUG,
"We just generated an extrainfo descriptor we can't parse.");
log_err(LD_BUG, "Descriptor was: <<%s>>", s);
+ tor_free(s_dup);
return -1;
}
tor_free(s_dup);