Skip to content
Snippets Groups Projects
Commit aa96abe6 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Fix memory leak in rend_cache_failure_entry_free()

Bug 17402.
parent 03eb999d
No related branches found
No related tags found
No related merge requests found
o Major bugfixes (memory leak):
- Fix a memory leak in rend_cache_failure_entry_free().
Fixes bug 17402; bugfix on 0.2.7.3-rc.
......@@ -122,6 +122,12 @@ rend_cache_failure_intro_entry_free(rend_cache_failure_intro_t *entry)
tor_free(entry);
}
static void
rend_cache_failure_intro_entry_free_(void *entry)
{
rend_cache_failure_intro_entry_free_(entry);
}
/** Allocate a rend cache failure intro object and return it. <b>failure</b>
* is set into the object. This function can not fail. */
static rend_cache_failure_intro_t *
......@@ -142,11 +148,9 @@ rend_cache_failure_entry_free(rend_cache_failure_t *entry)
}
/* Free and remove every intro failure object. */
DIGESTMAP_FOREACH_MODIFY(entry->intro_failures, key,
rend_cache_failure_intro_t *, e) {
rend_cache_failure_intro_entry_free(e);
MAP_DEL_CURRENT(key);
} DIGESTMAP_FOREACH_END;
digestmap_free(entry->intro_failures,
rend_cache_failure_intro_entry_free_);
tor_free(entry);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment