mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-13 06:33:44 +01:00
Fix a use-after-free error.
This commit is contained in:
parent
6847b9f6af
commit
954fb99a48
@ -131,8 +131,8 @@ cache_store_v3_as_dir(hs_cache_dir_descriptor_t *desc)
|
|||||||
* remove the entry we currently have from our cache so we can then
|
* remove the entry we currently have from our cache so we can then
|
||||||
* store the new one. */
|
* store the new one. */
|
||||||
remove_v3_desc_as_dir(cache_entry);
|
remove_v3_desc_as_dir(cache_entry);
|
||||||
cache_dir_desc_free(cache_entry);
|
|
||||||
rend_cache_decrement_allocation(cache_get_entry_size(cache_entry));
|
rend_cache_decrement_allocation(cache_get_entry_size(cache_entry));
|
||||||
|
cache_dir_desc_free(cache_entry);
|
||||||
}
|
}
|
||||||
/* Store the descriptor we just got. We are sure here that either we
|
/* Store the descriptor we just got. We are sure here that either we
|
||||||
* don't have the entry or we have a newer descriptor and the old one
|
* don't have the entry or we have a newer descriptor and the old one
|
||||||
|
Loading…
Reference in New Issue
Block a user