summaryrefslogtreecommitdiff
path: root/t/unit-tests/t-reftable-stack.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-10-02 12:56:36 +0200
committerJunio C Hamano <gitster@pobox.com>2024-10-02 07:53:56 -0700
commit24e0ade65baabccc3d6fcbde2f9c6eca0a0b7321 (patch)
tree009dab806f7c2ebb745531b750147d4cae3c5286 /t/unit-tests/t-reftable-stack.c
parentdaa59e9c439ce0bea7fecdf4ae6bb7b9e9400b00 (diff)
reftable: introduce `REFTABLE_FREE_AND_NULL()`
We have several calls to `FREE_AND_NULL()` in the reftable library, which of course uses free(3P). As the reftable allocators are pluggable we should rather call the reftable specific function, which is `reftable_free()`. Introduce a new macro `REFTABLE_FREE_AND_NULL()` and adapt the callsites accordingly. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/unit-tests/t-reftable-stack.c')
-rw-r--r--t/unit-tests/t-reftable-stack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/unit-tests/t-reftable-stack.c b/t/unit-tests/t-reftable-stack.c
index 6e41a4cf7e..cc2db2cdef 100644
--- a/t/unit-tests/t-reftable-stack.c
+++ b/t/unit-tests/t-reftable-stack.c
@@ -1149,7 +1149,7 @@ static void unclean_stack_close(struct reftable_stack *st)
for (size_t i = 0; i < st->readers_len; i++)
reftable_reader_decref(st->readers[i]);
st->readers_len = 0;
- FREE_AND_NULL(st->readers);
+ REFTABLE_FREE_AND_NULL(st->readers);
}
static void t_reftable_stack_compaction_concurrent_clean(void)