Skip to content

Commit

Permalink
Server: Fix minor anonymous TLS memory leak
Browse files Browse the repository at this point in the history
This is not documented anywhere, but SSL_CTRL_SET_TMP_DH creates a copy
of the DH structure, so we can immediately free it.
  • Loading branch information
dcommander committed Aug 3, 2024
1 parent f7748f0 commit 3531cc2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions unix/Xvnc/programs/Xserver/hw/vnc/rfbssl_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,8 @@ rfbSslCtx *rfbssl_init(rfbClientPtr cl, Bool anon)
rfbssl_error("SSL_CTX_set_tmp_dh()");
goto bailout;
}
crypto.DH_free(dh);
dh = NULL;
if (!ssl.SSL_CTX_set_cipher_list(ctx->ssl_ctx, rfbAuthCipherSuites ?
rfbAuthCipherSuites :
"aNULL")) {
Expand Down

0 comments on commit 3531cc2

Please sign in to comment.