diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-10-02 12:56:36 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-10-02 16:53:56 +0200 |
commit | 24e0ade65baabccc3d6fcbde2f9c6eca0a0b7321 (patch) | |
tree | 009dab806f7c2ebb745531b750147d4cae3c5286 /reftable/block.c | |
parent | reftable: fix calls to free(3P) (diff) | |
download | git-24e0ade65baabccc3d6fcbde2f9c6eca0a0b7321.tar.xz git-24e0ade65baabccc3d6fcbde2f9c6eca0a0b7321.zip |
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 'reftable/block.c')
-rw-r--r-- | reftable/block.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/reftable/block.c b/reftable/block.c index bfa7dc61bf..8d41a2f99e 100644 --- a/reftable/block.c +++ b/reftable/block.c @@ -551,9 +551,9 @@ done: void block_writer_release(struct block_writer *bw) { deflateEnd(bw->zstream); - FREE_AND_NULL(bw->zstream); - FREE_AND_NULL(bw->restarts); - FREE_AND_NULL(bw->compressed); + REFTABLE_FREE_AND_NULL(bw->zstream); + REFTABLE_FREE_AND_NULL(bw->restarts); + REFTABLE_FREE_AND_NULL(bw->compressed); strbuf_release(&bw->last_key); /* the block is not owned. */ } |