Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite0e569e

Browse files
committed
Fix memory leak when initializing DH parameters in backend
When loading DH parameters used for the generation of ephemeral DH keysin the backend, the code has never bothered releasing the memory usedfor the DH information loaded from a file or from libpq's default. Thiscommit makes sure that the information is properly free()'d.Note that as SSL parameters can be reloaded, this can cause an accumulationof memory leaked. As the leak is minor, no backpatch is done.Reported-by: Dmitry UspenskiyDiscussion:https://postgr.es/m/16160-18367e56e9a28264@postgresql.org
1 parent7c85be0 commite0e569e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/backend/libpq/be-secure-openssl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,8 +1015,11 @@ initialize_dh(SSL_CTX *context, bool isServerStart)
10151015
(errcode(ERRCODE_CONFIG_FILE_ERROR),
10161016
(errmsg("DH: could not set DH parameters: %s",
10171017
SSLerrmessage(ERR_get_error())))));
1018+
DH_free(dh);
10181019
return false;
10191020
}
1021+
1022+
DH_free(dh);
10201023
return true;
10211024
}
10221025

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp