pgsql: Fix memory leak when rejecting bogus DH parameters. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix memory leak when rejecting bogus DH parameters.
Date
Msg-id E1lNeli-0004vR-TO@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix memory leak when rejecting bogus DH parameters.

While back-patching e0e569e1d, I noted that there were some other
places where we ought to be applying DH_free(); namely, where we
load some DH parameters from a file and then reject them as not
being sufficiently secure.  While it seems really unlikely that
anybody would hit these code paths in production, let alone do
so repeatedly, let's fix it for consistency.

Back-patch to v10 where this code was introduced.

Discussion: https://postgr.es/m/16160-18367e56e9a28264@postgresql.org

Branch
------
master

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

Modified Files
--------------
src/backend/libpq/be-secure-openssl.c | 3 +++
1 file changed, 3 insertions(+)


pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: pgsql: Blindly try to fix test script's tar invocation for MSYS.
Next
From: Tom Lane
Date:
Subject: pgsql: Fix memory leak when initializing DH parameters in backend