Re: Missing NULL check after calling ecpg_strdup - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Missing NULL check after calling ecpg_strdup
Date
Msg-id aIAf9oDuO5DIaasA@paquier.xyz
Whole thread Raw
In response to Re: Missing NULL check after calling ecpg_strdup  (Aleksander Alekseev <aleksander@tigerdata.com>)
List pgsql-hackers
On Tue, Jul 22, 2025 at 04:20:53PM +0300, Aleksander Alekseev wrote:
> v7 may have a compilation warning on Linux:
>
> ```
> warning: unused variable ‘alloc_failed’ [-Wunused-variable]
> ```
>
> ... because the only use of the variable is hidden under #ifdef's.

Yep, thanks, didn't see this one coming.  Doing a CI run was still on
my list of things still to do.  I have just done one after a second
lookup and I think that we should be OK.

What you are suggesting for ECPGget_desc() is fine by me at the end.
Both are immediate failure checks and the first one is never expected
to be NULL, but the second with setlocale() needs that, so...

Applied v8 on HEAD.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Support getrandom() for pg_strong_random() source
Next
From: Michael Paquier
Date:
Subject: Re: Support for 8-byte TOAST values (aka the TOAST infinite loop problem)