1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

Merge pull request #8983 from Troy-Butler/handle-null-args

Fix NULL argument handling in mbedtls_xxx_free() functions
This commit is contained in:
Gilles Peskine
2024-07-04 14:50:55 +00:00
committed by GitHub
12 changed files with 53 additions and 1 deletions

View File

@ -84,6 +84,10 @@ void mbedtls_ssl_cookie_set_timeout(mbedtls_ssl_cookie_ctx *ctx, unsigned long d
void mbedtls_ssl_cookie_free(mbedtls_ssl_cookie_ctx *ctx)
{
if (ctx == NULL) {
return;
}
#if defined(MBEDTLS_USE_PSA_CRYPTO)
psa_destroy_key(ctx->psa_hmac_key);
#else