Fix leak on error in tls_construct_cke_gost

Don't leak pke_ctx on error.

Reviewed-by: Tim Hudson <tjh@openssl.org>
This commit is contained in:
Matt Caswell 2016-08-22 22:17:20 +01:00
parent b1b22b0b77
commit 2f3930bc0e

View File

@ -2368,7 +2368,7 @@ static int tls_construct_cke_gost(SSL *s, unsigned char **p, int *len, int *al)
if (pms == NULL) {
*al = SSL_AD_INTERNAL_ERROR;
SSLerr(SSL_F_TLS_CONSTRUCT_CKE_GOST, ERR_R_MALLOC_FAILURE);
return 0;
goto err;
}
if (EVP_PKEY_encrypt_init(pkey_ctx) <= 0