Set sess to NULL after freeing it.

Found by OSS-fuzz

Bug introduced in commit 61fb59238d

Reviewed-by: Matt Caswell <matt@openssl.org>
GH: #6235
This commit is contained in:
Kurt Roeckx 2018-05-12 12:08:14 +02:00
parent a925e7dbf4
commit 5f96a95e25

View file

@ -1384,6 +1384,7 @@ SSL_TICKET_STATUS tls_decrypt_ticket(SSL *s, const unsigned char *etick,
/* Some additional consistency checks */
if (slen != 0) {
SSL_SESSION_free(sess);
sess = NULL;
ret = SSL_TICKET_NO_DECRYPT;
goto end;
}