--- /dev/null
+ o Minor bug fixes (unit tests, hidden services):
+ - Avoid relying on malloc internals in test_rend_cache_purge.
+ Closes ticket 17724. Bug fix on ade5005853c1 and 5e9f2384cf0f,
+ not in any released version of Tor. Patch by "teor".
static void
test_rend_cache_purge(void *data)
{
- strmap_t *our_rend_cache;
-
(void)data;
// Deals with a NULL rend_cache
rend_cache_purge();
tt_assert(rend_cache);
- tt_int_op(strmap_size(rend_cache), OP_EQ, 0);
+ tt_assert(strmap_size(rend_cache) == 0);
// Deals with existing rend_cache
rend_cache_free_all();
rend_cache_init();
+ tt_assert(rend_cache);
+ tt_assert(strmap_size(rend_cache) == 0);
- our_rend_cache = rend_cache;
rend_cache_purge();
tt_assert(rend_cache);
tt_assert(strmap_size(rend_cache) == 0);
- tt_assert(rend_cache == our_rend_cache);
done:
rend_cache_free_all();