mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-05-04 16:57:58 +00:00
BUG/MINOR: ssl: fix potential memory leak in ssl_sock_load_dh_params()
Valgrind reports that the memory allocated in ssl_get_dh_1024() was leaking. Upon further inspection of openssl code, it seems that SSL_CTX_set_tmp_dh makes a copy of the data, so calling DH_free afterwards makes sense.
This commit is contained in:
parent
4b788f7d34
commit
0ea4c23ca7
@ -1643,6 +1643,7 @@ int ssl_sock_load_dh_params(SSL_CTX *ctx, const char *file)
|
||||
goto end;
|
||||
|
||||
SSL_CTX_set_tmp_dh(ctx, local_dh_1024);
|
||||
DH_free(local_dh_1024);
|
||||
}
|
||||
else {
|
||||
SSL_CTX_set_tmp_dh_callback(ctx, ssl_get_tmp_dh);
|
||||
|
Loading…
Reference in New Issue
Block a user