]> git.ipfire.org Git - thirdparty/git.git/commit
reftable/basics: handle allocation failures in `parse_names()`
authorPatrick Steinhardt <ps@pks.im>
Wed, 2 Oct 2024 10:55:38 +0000 (12:55 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 Oct 2024 14:53:51 +0000 (07:53 -0700)
commiteef7bcdafe0037f14a96c564ace899342b9ed0fb
treef22f256d6bed8a3110af520cbb60a79da3f64657
parent6593e147d3992eb52cb53b6f8a09dc3e10f79613
reftable/basics: handle allocation failures in `parse_names()`

Handle allocation failures in `parse_names()` by returning `NULL` in
case any allocation fails. While at it, refactor the function to return
the array directly instead of assigning it to an out-pointer.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
reftable/basics.c
reftable/basics.h
reftable/stack.c
t/unit-tests/t-reftable-basics.c