]> git.ipfire.org Git - thirdparty/git.git/commit
t-reftable-readwrite: use free_names() instead of a for loop
authorChandra Pratap <chandrapratap3519@gmail.com>
Tue, 13 Aug 2024 14:34:48 +0000 (20:04 +0530)
committerJunio C Hamano <gitster@pobox.com>
Tue, 13 Aug 2024 17:08:02 +0000 (10:08 -0700)
commit3dd4fb13a080ba9cbcf047e94b7fc4ed35b6153e
tree9a07eb886a2adeaa98349ea591d7543aad33201b
parent5b539a53613355a22f5c525eebdd9117fdaedb90
t-reftable-readwrite: use free_names() instead of a for loop

free_names() as defined by reftable/basics.{c,h} frees a NULL
terminated array of malloced strings along with the array itself.
Use this function instead of a for loop to free such an array.

Mentored-by: Patrick Steinhardt <ps@pks.im>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Chandra Pratap <chandrapratap3519@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/unit-tests/t-reftable-readwrite.c