]> git.ipfire.org Git - thirdparty/git.git/commit
reftable: handle realloc error in parse_names()
authorRené Scharfe <l.s.r@web.de>
Sat, 28 Dec 2024 09:48:50 +0000 (10:48 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 28 Dec 2024 16:00:44 +0000 (08:00 -0800)
commite4981ed1e72d3f25da901b9415d2c4805bed0dbc
treebfd4661fe27c1992f25113b315ec427f296133b6
parent2cca185e85171c462166839cfd6ee57c09573160
reftable: handle realloc error in parse_names()

Check the final reallocation for adding the terminating NULL and handle
it just like those in the loop.  Simply use REFTABLE_ALLOC_GROW instead
of keeping the REFTABLE_REALLOC_ARRAY call and adding code to preserve
the original pointer value around it.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
reftable/basics.c