Skip to content

Commit

Permalink
Check for NULL when freeing the QUIC_TLS object
Browse files Browse the repository at this point in the history
Free functions are expected to be tolerant of a NULL pointer being passed.

Fixes the problem in
openssl#21668 (comment)
  • Loading branch information
mattcaswell committed Oct 27, 2023
1 parent 2b5e028 commit aead587
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ssl/quic/quic_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,8 @@ QUIC_TLS *ossl_quic_tls_new(const QUIC_TLS_ARGS *args)

void ossl_quic_tls_free(QUIC_TLS *qtls)
{
if (qtls == NULL)
return;
OSSL_ERR_STATE_free(qtls->error_state);
OPENSSL_free(qtls);
}
Expand Down

0 comments on commit aead587

Please sign in to comment.