mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
r19074@catbus: nickm | 2008-03-26 17:08:32 -0400
Start new address policies with refcount of 1, not 2. Backport candidate once tested more. svn:r14204
This commit is contained in:
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
return cert;
|
||||
err:
|
||||
authority_cert_free(cert);
|
||||
SMARTLIST_FOREACH(tokens, directory_token_t *, t, token_free(t));
|
||||
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);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user