summaryrefslogtreecommitdiff
path: root/src/or/hs_cache.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2016-11-04 14:03:35 -0400
committerNick Mathewson <nickm@torproject.org>2016-11-04 14:07:33 -0400
commit954fb99a48ea12a6c1aa48e2ce1a8acf8fbe456b (patch)
tree9d847521a3376a22357c94f9b30973ded9c02d01 /src/or/hs_cache.c
parent6847b9f6af1db75e44c7249b04820bf82f00a887 (diff)
downloadtor-954fb99a48ea12a6c1aa48e2ce1a8acf8fbe456b.tar.gz
tor-954fb99a48ea12a6c1aa48e2ce1a8acf8fbe456b.zip
Fix a use-after-free error.
Diffstat (limited to 'src/or/hs_cache.c')
-rw-r--r--src/or/hs_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/hs_cache.c b/src/or/hs_cache.c
index b5369c0974..b7ff979e5b 100644
--- a/src/or/hs_cache.c
+++ b/src/or/hs_cache.c
@@ -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
* store the new one. */
remove_v3_desc_as_dir(cache_entry);
- cache_dir_desc_free(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
* don't have the entry or we have a newer descriptor and the old one