]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix memory leak when rejecting bogus DH parameters.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 20 Mar 2021 16:47:21 +0000 (12:47 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 20 Mar 2021 16:47:42 +0000 (12:47 -0400)
commit2f31414f4322876b34674eedc6e7d19c29ebe0d0
treec6954b4f975f2d1a796218e3959015993dcc2e35
parent992cba94d38ef20765e4c54e4dff00ae8a58a6c5
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
src/backend/libpq/be-secure-openssl.c