]> git.ipfire.org Git - thirdparty/git.git/commit
reftable: introduce `REFTABLE_FREE_AND_NULL()`
authorPatrick Steinhardt <ps@pks.im>
Wed, 2 Oct 2024 10:56:36 +0000 (12:56 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 Oct 2024 14:53:56 +0000 (07:53 -0700)
commit24e0ade65baabccc3d6fcbde2f9c6eca0a0b7321
tree009dab806f7c2ebb745531b750147d4cae3c5286
parentdaa59e9c439ce0bea7fecdf4ae6bb7b9e9400b00
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>
reftable/basics.h
reftable/block.c
reftable/iter.c
reftable/pq.c
reftable/reader.c
reftable/record.c
reftable/stack.c
reftable/writer.c
t/unit-tests/t-reftable-stack.c