t-reftable-merged: handle realloc errors

Check reallocation errors in unit tests, like everywhere else.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
René Scharfe 2024-12-28 10:49:38 +01:00 committed by Junio C Hamano
parent e4981ed1e7
commit 1e78120928
1 changed files with 2 additions and 2 deletions

View File

@ -178,7 +178,7 @@ static void t_merged_refs(void)
if (err > 0) if (err > 0)
break; break;


REFTABLE_ALLOC_GROW(out, len + 1, cap); check(!REFTABLE_ALLOC_GROW(out, len + 1, cap));
out[len++] = ref; out[len++] = ref;
} }
reftable_iterator_destroy(&it); reftable_iterator_destroy(&it);
@ -459,7 +459,7 @@ static void t_merged_logs(void)
if (err > 0) if (err > 0)
break; break;


REFTABLE_ALLOC_GROW(out, len + 1, cap); check(!REFTABLE_ALLOC_GROW(out, len + 1, cap));
out[len++] = log; out[len++] = log;
} }
reftable_iterator_destroy(&it); reftable_iterator_destroy(&it);