Skip to content

Commit

Permalink
Fix memory leaks in SocketMbedTLS when closing.
Browse files Browse the repository at this point in the history
  • Loading branch information
plmzod authored Sep 3, 2024
1 parent 9884c32 commit cc48158
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ixwebsocket/IXSocketMbedTLS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,11 @@ namespace ix
mbedtls_entropy_free(&_entropy);
mbedtls_x509_crt_free(&_cacert);
mbedtls_x509_crt_free(&_cert);
mbedtls_pk_free(&_pkey);
if (MBEDTLS_VERSION_MAJOR >= 3 && MBEDTLS_VERSION_MINOR >= 6 && MBEDTLS_VERSION_PATCH >= 0)
{
mbedtls_psa_crypto_free();
}

Socket::close();
}
Expand Down

0 comments on commit cc48158

Please sign in to comment.