diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-10-21 10:28:16 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-10-21 10:28:16 -0400 |
commit | a5e873ff29d066532322a6946c2bc4d034be8c2d (patch) | |
tree | df7f25fcbab018f6e349c1c6cdd08a3587a1b8b6 /src/or/rendcache.c | |
parent | 6ef35319d9d2f9ed5cdd6f73089029c7cfce0d43 (diff) | |
parent | 03eb999d42a582bece2063fc06f34fad72e05be5 (diff) | |
download | tor-a5e873ff29d066532322a6946c2bc4d034be8c2d.tar.gz tor-a5e873ff29d066532322a6946c2bc4d034be8c2d.zip |
Merge remote-tracking branch 'origin/maint-0.2.7'
Diffstat (limited to 'src/or/rendcache.c')
-rw-r--r-- | src/or/rendcache.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/or/rendcache.c b/src/or/rendcache.c index e377e9ad81..82c0336fa1 100644 --- a/src/or/rendcache.c +++ b/src/or/rendcache.c @@ -369,7 +369,7 @@ cache_failure_intro_add(const uint8_t *identity, const char *service_id, rend_intro_point_failure_t failure) { rend_cache_failure_t *fail_entry; - rend_cache_failure_intro_t *entry; + rend_cache_failure_intro_t *entry, *old_entry; /* Make sure we have a failure object for this service ID and if not, * create it with this new intro failure entry. */ @@ -380,7 +380,10 @@ cache_failure_intro_add(const uint8_t *identity, const char *service_id, strmap_set_lc(rend_cache_failure, service_id, fail_entry); } entry = rend_cache_failure_intro_entry_new(failure); - digestmap_set(fail_entry->intro_failures, (char *) identity, entry); + old_entry = digestmap_set(fail_entry->intro_failures, + (char *) identity, entry); + /* This _should_ be NULL, but in case it isn't, free it. */ + rend_cache_failure_intro_entry_free(old_entry); } /** Using a parsed descriptor <b>desc</b>, check if the introduction points |