Re: Missing NULL check after calling ecpg_strdup
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Aleksander Alekseev <aleksander@tigerdata.com>
Cc: pgsql-hackers@lists.postgresql.org, Evgeniy Gorbanev <gorbanyoves@basealt.ru>
Date: 2025-07-22T23:34:14Z
Lists: 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
Commits
-
ecpg: Improve error detection around ecpg_strdup()
- a6eabec6808c 19 (unreleased) landed
-
ecpg: Fix NULL pointer dereference during connection lookup
- c934d5673894 13.22 landed
- 408fe659a890 14.19 landed
- 0123922f82d2 15.14 landed
- 313d3102facd 16.10 landed
- 2805e1c1edd5 17.6 landed
- 0ded7615d8ca 18.0 landed
- 1b8bbee05d70 19 (unreleased) landed