summaryrefslogtreecommitdiff
path: root/t/unit-tests
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2024-12-28 10:49:38 +0100
committerJunio C Hamano <gitster@pobox.com>2024-12-28 08:00:45 -0800
commit1e781209284eb5952e153339f45bf0c1555e78bb (patch)
tree77aedbac7a1aeedf00f372a2661b32f299ff817e /t/unit-tests
parente4981ed1e72d3f25da901b9415d2c4805bed0dbc (diff)
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>
Diffstat (limited to 't/unit-tests')
-rw-r--r--t/unit-tests/t-reftable-merged.c4
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);