reftable: fix calls to free(3P)

There are a small set of calls to free(3P) in the reftable library. As the reftable allocators are pluggable we should rather call the reftable specific function, which is `reftable_free()`. Convert the code accordingly. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Patrick Steinhardt committed Oct 2, 2024 at 12:56 UTC daa59e9c439ce0bea7fecdf4ae6bb7b9e9400b00
2 files changed +3 -3
reftable/stack.c
+1 -1
@@ -1421,7 +1421,7 @@ static int stack_compact_range(struct reftable_stack *st,
1421 struct lock_file *table_lock = &table_locks[i];
1422 char *table_path = get_locked_file_path(table_lock);
1423 unlink(table_path);
1424 - free(table_path);
1424 + reftable_free(table_path);
1425 }
1426
1427 done:
t/unit-tests/t-reftable-readwrite.c
+2 -2
@@ -76,8 +76,8 @@ static void write_table(char ***names, struct strbuf *buf, int N,
76
77 t_reftable_write_to_buf(buf, refs, N, logs, N, &opts);
78
79 - free(refs);
80 - free(logs);
79 + reftable_free(refs);
80 + reftable_free(logs);
81 }
82
83 static void t_log_buffer_size(void)