diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c index 0c49619b5..7333ba926 100644 --- a/ssl/t1_enc.c +++ b/ssl/t1_enc.c @@ -649,6 +649,7 @@ int tls1_setup_key_block(SSL *s) if ((p2 = (unsigned char *)OPENSSL_malloc(num)) == NULL) { SSLerr(SSL_F_TLS1_SETUP_KEY_BLOCK, ERR_R_MALLOC_FAILURE); + OPENSSL_free(p1); goto err; } #ifdef TLS_DEBUG