diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-01-01 09:21:13 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-01-01 09:21:13 -0800 |
| commit | 73e35b172a74cfab8f1db450113f2bf826b40b60 (patch) | |
| tree | e11a2f43cfbd98fb8bb589e2be9ccf38eeb19302 /t/unit-tests/t-reftable-merged.c | |
| parent | bc2c65770dca70c1d4e151fad971bc7c7235a702 (diff) | |
| parent | 1e781209284eb5952e153339f45bf0c1555e78bb (diff) | |
| download | git-73e35b172a74cfab8f1db450113f2bf826b40b60.tar.gz | |
Merge branch 'rs/reftable-realloc-errors'
The custom allocator code in the reftable library did not handle
failing realloc() very well, which has been addressed.
* rs/reftable-realloc-errors:
t-reftable-merged: handle realloc errors
reftable: handle realloc error in parse_names()
reftable: fix allocation count on realloc error
reftable: avoid leaks on realloc error
Diffstat (limited to 't/unit-tests/t-reftable-merged.c')
| -rw-r--r-- | t/unit-tests/t-reftable-merged.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/unit-tests/t-reftable-merged.c b/t/unit-tests/t-reftable-merged.c index a12bd0e1a3..60836f80d6 100644 --- a/t/unit-tests/t-reftable-merged.c +++ b/t/unit-tests/t-reftable-merged.c @@ -178,7 +178,7 @@ static void t_merged_refs(void) if (err > 0) break; - REFTABLE_ALLOC_GROW(out, len + 1, cap); + check(!REFTABLE_ALLOC_GROW(out, len + 1, cap)); out[len++] = ref; } reftable_iterator_destroy(&it); @@ -459,7 +459,7 @@ static void t_merged_logs(void) if (err > 0) break; - REFTABLE_ALLOC_GROW(out, len + 1, cap); + check(!REFTABLE_ALLOC_GROW(out, len + 1, cap)); out[len++] = log; } reftable_iterator_destroy(&it); |
