postgresql/src
Tom Lane b7ab88ddb1 Fix assorted new memory leaks in libpq.
Valgrind'ing the postgres_fdw tests showed me that libpq was leaking
PGconn.be_cancel_key.  It looks like freePGconn is expecting
pqDropServerData to release it ... but in a cancel connection
object, that doesn't happen.

Looking a little closer, I was dismayed to find that freePGconn
also missed freeing the pgservice, min_protocol_version,
max_protocol_version, sslkeylogfile, scram_client_key_binary,
and scram_server_key_binary strings.  There's much less excuse
for those oversights.  Worse, that's from five different commits
(a460251f0, 4b99fed75, 285613c60, 2da74d8d6, 761c79508),
some of them by extremely senior hackers.

Fortunately, all of these are new in v18, so we haven't
shipped any leaky versions of libpq.

While at it, reorder the operations in freePGconn to match the
order of the fields in struct PGconn.  Some of those free's seem
to have been inserted with the aid of a dartboard.
2025-05-22 20:35:32 -04:00
..
backend Replace deprecated log_connections values in docs and tests 2025-05-22 17:14:54 -04:00
bin pg_dump: Adjust reltuples from 0 to -1 for dumps of older versions. 2025-05-22 10:23:26 -05:00
common Use 'void *' for arbitrary buffers, 'uint8 *' for byte arrays 2025-05-08 22:01:25 +03:00
fe_utils Fix incorrect format placeholders 2025-04-25 16:49:30 +02:00
include Revert "Don't lock partitions pruned by initial pruning" 2025-05-22 17:02:35 +09:00
interfaces Fix assorted new memory leaks in libpq. 2025-05-22 20:35:32 -04:00
makefiles oauth: Move the builtin flow into a separate module 2025-05-01 09:14:30 -07:00
pl Translation updates 2025-05-05 12:04:49 +02:00
port Fix incorrect year in some copyright notices 2025-05-19 09:46:52 +09:00
template thread-safety: gmtime_r(), localtime_r() 2024-08-23 07:43:04 +02:00
test Replace deprecated log_connections values in docs and tests 2025-05-22 17:14:54 -04:00
timezone Update time zone data files to tzdata release 2025b. 2025-04-30 11:13:49 -04:00
tools Replace deprecated log_connections values in docs and tests 2025-05-22 17:14:54 -04:00
tutorial Doc: simplify the tutorial's window-function examples. 2025-01-21 14:43:21 -05:00
.gitignore
DEVELOPERS
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
Makefile.global.in oauth: Move the builtin flow into a separate module 2025-05-01 09:14:30 -07:00
Makefile.shlib Remove AIX support 2024-02-28 15:17:23 +04:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
nls-global.mk Remove distprep 2023-11-06 15:18:04 +01:00