-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
statem_srvr.c : Release pkey_ctx on initialization failure #24366
Conversation
@irosay This would be ok with CLA: trivial. Could you please amend the commit message with |
675a0ef
to
033dd55
Compare
ssl/statem/statem_srvr.c
Outdated
@@ -3229,6 +3229,7 @@ static int tls_process_cke_gost(SSL_CONNECTION *s, PACKET *pkt) | |||
return 0; | |||
} | |||
if (EVP_PKEY_decrypt_init(pkey_ctx) <= 0) { | |||
EVP_PKEY_CTX_free(pkey_ctx); | |||
SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); | |||
return 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A fix more consistent with the rest of this function might be to instead replace this return 0
with a goto err
ssl/statem/statem_srvr.c
Outdated
@@ -3229,8 +3229,9 @@ static int tls_process_cke_gost(SSL_CONNECTION *s, PACKET *pkt) | |||
return 0; | |||
} | |||
if (EVP_PKEY_decrypt_init(pkey_ctx) <= 0) { | |||
EVP_PKEY_CTX_free(pkey_ctx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This now isn't necessary since the err block already does it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay thank you
CLA: trivial
Ok with trivial |
OK with CLA: trivial |
This pull request is ready to merge |
Merged to all the active branches. Thank you for your contribution. |
CLA: trivial Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from #24366)
CLA: trivial Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from openssl#24366)
Fixes #24341
Checklist