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:14:57 +0000 (11:14 -0500)
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
ssl/t1_enc.c

index 0c49619b5da0188979837d6402ed3a8fdd40c6a1..7333ba926b413d3a30de655510abe914a218fe09 100644 (file)
@@ -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