Blob Blame History Raw
diff -up openssl-1.0.1e/ssl/t1_lib.c.ticket-leak openssl-1.0.1e/ssl/t1_lib.c
--- openssl-1.0.1e/ssl/t1_lib.c.ticket-leak	2014-10-15 13:19:26.825454374 +0200
+++ openssl-1.0.1e/ssl/t1_lib.c	2014-10-15 13:19:59.955202293 +0200
@@ -2280,7 +2280,10 @@ static int tls_decrypt_ticket(SSL *s, co
 	HMAC_Final(&hctx, tick_hmac, NULL);
 	HMAC_CTX_cleanup(&hctx);
 	if (CRYPTO_memcmp(tick_hmac, etick + eticklen, mlen))
+		{
+		EVP_CIPHER_CTX_cleanup(&ctx);
 		return 2;
+		}
 	/* Attempt to decrypt session data */
 	/* Move p after IV to start of encrypted ticket, update length */
 	p = etick + 16 + EVP_CIPHER_CTX_iv_length(&ctx);