From: Daniel Gustafsson <dgustafsson@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Clear SSL_hosts when destroying TLS
Date: Tue, 06 Oct 2026 11:52:22 +0000
Message-ID: <E1xE3iY-00000000Y0C-31zX@gemulon.postgresql.org> (raw)
Clear SSL_hosts when destroying TLS
The loaded SSL_CTX objects were cleared on SSL initialization but not
when destroying the TLS objects via be_tls_destroy(). This would not
leak the contexts, but consume memory for no reason.
Reported-by: Jacob Champion <jacob.champion@enterprisedb.com>
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Rui Zhao <zhaorui126@gmail.com>
Discussion: https://postgr.es/m/CAOYmi+mAtEn4wN3xx=r4TaY5AHy9_q9XncM8YQLhofE3op0SvA@mail.gmail.com
Backpatch-through: 19
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/ff684b6be258ab535f77df7b86d8252c1e72a421
Modified Files
--------------
src/backend/libpq/be-secure-openssl.c | 7 +++++++
1 file changed, 7 insertions(+)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: dgustafsson@postgresql.org
Subject: Re: pgsql: Clear SSL_hosts when destroying TLS
In-Reply-To: <E1xE3iY-00000000Y0C-31zX@gemulon.postgresql.org>
References: <E1xE3iY-00000000Y0C-31zX@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox