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:
parent
a925e7dbf4
commit
5f96a95e25
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue