Subject: Re: [PATCH v6 02/15] reftable: fix resource leak in block.c error path

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Fri, 21 Jan 2022 12:42:21 +0100

On Thu, Jan 20 2022, Han-Wen Nienhuys via GitGitGadget wrote:

> From: Han-Wen Nienhuys <[email-masked]>
>
> Add test coverage for corrupt zlib data. Fix memory leaks demonstrated by
> unittest.
>
> This problem was discovered by a Coverity scan.
>
> Signed-off-by: Han-Wen Nienhuys <[email-masked]>
> ---
>  reftable/block.c          | 26 +++++++++------
>  reftable/reader.c         | 23 ++++++++------
>  reftable/readwrite_test.c | 66 +++++++++++++++++++++++++++++++++++++++
>  3 files changed, 97 insertions(+), 18 deletions(-)
>
> diff --git a/reftable/block.c b/reftable/block.c
> index 855e3f5c947..6c8e8705205 100644
> --- a/reftable/block.c
> +++ b/reftable/block.c
> @@ -188,13 +188,16 @@ int block_reader_init(struct block_reader *br, struct reftable_block *block,
>  	uint32_t full_block_size = table_block_size;
>  	uint8_t typ = block->data[header_off];
>  	uint32_t sz = get_be24(block->data + header_off + 1);
> -

stray extra whitespace being added in the middle of variable
declarations.