Missing OPENSSL_free on error path.
authorEric Dequin <Dequin_Eric@emc.com>
Thu, 12 Feb 2015 15:44:30 +0000 (10:44 -0500)
committerRich Salz <rsalz@openssl.org>
Thu, 12 Feb 2015 16:15:29 +0000 (11:15 -0500)
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 1d2932de4cefcc200f175863a42c311916269981)

ssl/t1_enc.c

index 0f5baa6e452435c143bcad22891908f1211c0346..e1a360797d1630de705fa87b95908046f9daf809 100644 (file)
@@ -650,6 +650,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