Re: BUG #17186: In connect.c, the lock connections_mutex is not correctly released(Line 463) at the return(Line 522)
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: ryancaicse@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2021-09-10T07:07:26Z
Lists: pgsql-bugs
On Fri, Sep 10, 2021 at 04:29:36AM +0000, PG Bug reporting form wrote: > The problem is that the lock connections_mutex should be released at the end > of the function. But it not released when conn_keywords == NULL || > conn_values == NULL (ecpg_alloc got errors and return NULL). ecpg_alloc() is just a wrapper to calloc(), so errors are very unlikely going to happen in this code path. It does not change the fact that it is wrong. Nice catch, will fix. -- Michael
Commits
-
Fix error handling with threads on OOM in ECPG connection logic
- 3768c468df58 9.6.24 landed
- 83a3737a63a5 10.19 landed
- b6a10ff4abe9 11.14 landed
- b34dcf87f685 12.9 landed
- b589d212fdd7 13.5 landed
- cc057fb315e2 14.0 landed
- fa703b317e9d 15.0 landed
-
Detect POLLHUP/POLLRDHUP while running queries.
- c30f54ad732c 14.0 cited