diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-08-23 16:12:43 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-08-23 08:04:47 -0700 |
| commit | 00e130a6bb3535de2a1a5f96640a8723fef09c87 (patch) | |
| tree | cb8f40f70d07677e584ac06000bb1ce9f94f67ff /reftable/stack.c | |
| parent | 2de3c0d34555685a0502e81a37436a7db41a2ddf (diff) | |
| download | git-00e130a6bb3535de2a1a5f96640a8723fef09c87.tar.gz | |
reftable/reader: inline `reader_close()`
Same as with the preceding commit, we also provide a `reader_close()`
function that allows the caller to close a reader without freeing it.
This is unnecessary now that all users will have an allocated version of
the reader.
Inline it into `reftable_reader_free()`.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reftable/stack.c')
| -rw-r--r-- | reftable/stack.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/reftable/stack.c b/reftable/stack.c index c72435b059..0ac9cdf8de 100644 --- a/reftable/stack.c +++ b/reftable/stack.c @@ -290,7 +290,6 @@ static int reftable_stack_reload_once(struct reftable_stack *st, const char *name = reader_name(cur[i]); stack_filename(&table_path, st, name); - reader_close(cur[i]); reftable_reader_free(cur[i]); /* On Windows, can only unlink after closing. */ @@ -299,10 +298,8 @@ static int reftable_stack_reload_once(struct reftable_stack *st, } done: - for (i = 0; i < new_readers_len; i++) { - reader_close(new_readers[i]); + for (i = 0; i < new_readers_len; i++) reftable_reader_free(new_readers[i]); - } reftable_free(new_readers); reftable_free(cur); strbuf_release(&table_path); |
