commit 404c224c711714f014288c79257c4bfd3880905c parent a47d12c64d51edf702d7beaefb1f8ca97e8dd0f5 Author: Nick Mathewson <nickm@torproject.org> Date: Thu, 17 Sep 2020 13:56:40 -0400 Merge branch 'maint-0.4.4' Diffstat:
| A | changes/ticket40125 | | | 4 | ++++ |
| M | src/test/test_rendcache.c | | | 2 | ++ |
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/changes/ticket40125 b/changes/ticket40125 @@ -0,0 +1,4 @@ + o Testing (onion service v2): + - Fix a rendezvous cache unit test that was triggering an underflow on the + global rend cache allocation. Fixes bug 40125; bugfix on + 0.2.8.1-alpha. diff --git a/src/test/test_rendcache.c b/src/test/test_rendcache.c @@ -974,11 +974,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: */