Subject: Re: [PATCH v4 00/25] reftable: handle allocation errors

From: Junio C Hamano <[email-masked]>
Date: Tue, 01 Oct 2024 10:52:53 -0700

Patrick Steinhardt <[email-masked]> writes:

> this is the fourth version of this patch series that converts the
> reftable library to start handling allocation errors. This is done such
> that the reftable library can truly behave like a library and let its
> callers handle such conditions.
>
> Changes compared to v3:
>
>   - Fix some additional sites where we use strdup(3P)/free(3P) by
>     accident.
>
>   - Convert preexisting callsites of free(3P) to use reftable_free().
>
>   - Introduce a REFTABLE_FREE_AND_NULL() macro and use it.
>
>   - Ban standard allocators in reftable code "banned.h"-style.

With this patch, there is only one hit from

    $ git grep '[^_]free(' reftable/

and no hits from

    $ git grep '[^_]FREE_AND_NULL(' reftable/

which is just as expected.  Nicely done.

Shouldn't we add FREE_AND_NULL() to the banned list as well in the
last step?

Thanks.