diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/or/policies.c | 2 | ||||
-rw-r--r-- | src/or/routerparse.c | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/or/policies.c b/src/or/policies.c index cccc72acb..31b7917e9 100644 --- a/src/or/policies.c +++ b/src/or/policies.c @@ -495,7 +495,7 @@ addr_policy_get_canonical_entry(addr_policy_t *e) found = tor_malloc_zero(sizeof(policy_map_ent_t)); found->policy = tor_memdup(e, sizeof(addr_policy_t)); found->policy->is_canonical = 1; - found->policy->refcnt = 1; + found->policy->refcnt = 0; HT_INSERT(policy_map, &policy_root, found); } diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 9bbeb66c3..7ff6c6311 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -1652,18 +1652,20 @@ authority_cert_parse_from_string(const char *s, const char **end_of_string) *end_of_string = eat_whitespace(eos); } SMARTLIST_FOREACH(tokens, directory_token_t *, t, token_free(t)); - if (area) - memarea_drop_all(area); smartlist_free(tokens); + if (area) { + DUMP_AREA(area, "authority cert"); + memarea_drop_all(area); + } return cert; err: authority_cert_free(cert); SMARTLIST_FOREACH(tokens, directory_token_t *, t, token_free(t)); + smartlist_free(tokens); if (area) { DUMP_AREA(area, "authority cert"); memarea_drop_all(area); } - smartlist_free(tokens); return NULL; } |