On Wed, Apr 8, 2026 at 2:25 PM Peter Eisentraut <peter@eisentraut.org> wrote:
> This was recently (as in: I still remember it) discussed:
>
> https://www.postgresql.org/message-id/flat/cf26e970-8e92-59f1-247a-aa265235075b%40enterprisedb.com
>
> Probably not worth opening up again.
Fair enough.
> But it seems to me that the pfree() in fe_memutils.c should
> Assert(pointer != NULL), to be consistent with the backend version.
From a quick meson run, it looks like my FREE() macro would be the
only thing that trips that assertion. So yeah, I guess so.
> I've also been thinking sometimes about a pfree_if_nonnull() (which
> would do { if (ptr) pfree(ptr)) }. That would in some cases make the
> notation more compact and robust. Maybe it could help here too?
No strong opinion there.
--Jacob