Commit 5f96a95e authored by Kurt Roeckx's avatar Kurt Roeckx
Browse files

Set sess to NULL after freeing it.



Found by OSS-fuzz

Bug introduced in commit 61fb5923

Reviewed-by: default avatarMatt Caswell <matt@openssl.org>
GH: #6235
parent a925e7db
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
        }