aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-09-28 10:35:12 -0400
committerNick Mathewson <nickm@torproject.org>2020-09-28 10:35:12 -0400
commit79d777396858d008bb99d0f411953a5152b921b0 (patch)
tree37a82473d5c15d159c608f27ff702bee5f3d9703 /src/test
parent020e8e41c676370de66d3ddf459700867ed454cd (diff)
parentfaf89ec6c2e0db1ba82639c41a4c754751f4ce1d (diff)
downloadtor-79d777396858d008bb99d0f411953a5152b921b0.tar.gz
tor-79d777396858d008bb99d0f411953a5152b921b0.zip
Merge branch 'maint-0.3.5' into bug40133_035
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_rendcache.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/test_rendcache.c b/src/test/test_rendcache.c
index 93f9f82953..8b0e2df485 100644
--- a/src/test/test_rendcache.c
+++ b/src/test/test_rendcache.c
@@ -954,6 +954,7 @@ test_rend_cache_free_all(void *data)
one->parsed = desc_one;
desc_one->timestamp = time(NULL) + TIME_IN_THE_PAST;
desc_one->pk = pk_generate(0);
+ rend_cache_increment_allocation(rend_cache_entry_allocation(one));
strmap_set_lc(rend_cache, "foo1", one);
rend_cache_free_all();
@@ -978,11 +979,13 @@ test_rend_cache_entry_free(void *data)
// Handles NULL descriptor correctly
e = tor_malloc_zero(sizeof(rend_cache_entry_t));
+ rend_cache_increment_allocation(rend_cache_entry_allocation(e));
rend_cache_entry_free(e);
// Handles non-NULL descriptor correctly
e = tor_malloc_zero(sizeof(rend_cache_entry_t));
e->desc = tor_malloc(10);
+ rend_cache_increment_allocation(rend_cache_entry_allocation(e));
rend_cache_entry_free(e);
/* done: */