pgsql: Don't leak malloc'd error string in libpqrcv_check_conninfo(). - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Don't leak malloc'd error string in libpqrcv_check_conninfo().
Date
Msg-id E1lN4nd-0001oq-NV@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Don't leak malloc'd error string in libpqrcv_check_conninfo().

We leaked the error report from PQconninfoParse, when there was
one.  It seems unlikely that real usage patterns would repeat
the failure often enough to create serious bloat, but let's
back-patch anyway to keep the code similar in all branches.

Found via valgrind testing.
Back-patch to v10 where this code was added.

Discussion: https://postgr.es/m/3816764.1616104288@sss.pgh.pa.us

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ba986b7bc5cf2cc9f586e553f78ab9b2b199fac2

Modified Files
--------------
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)


pgsql-committers by date:

Previous
From: Tomas Vondra
Date:
Subject: pgsql: Fix TAP test for remove_temp_files_after_crash
Next
From: Fujii Masao
Date:
Subject: pgsql: Fix comments in postmaster.c.