commit | 9ac3e23f5dff2787bb82c504166b60d03f0a94c1 | [log] [tgz] |
---|---|---|
author | Troy-Butler <squintik@outlook.com> | Fri Mar 22 14:46:04 2024 -0400 |
committer | Troy-Butler <squintik@outlook.com> | Fri Mar 22 14:46:04 2024 -0400 |
tree | e3e86a6129c7e6fbc2abcf62bf81532feba977cd | |
parent | 611f899c0c9d397baedfaec34ea0861ad2543991 [diff] [blame] |
Fix NULL argument handling in mbedtls_xxx_free() functions Signed-off-by: Troy-Butler <squintik@outlook.com>
diff --git a/library/net_sockets.c b/library/net_sockets.c index edec587..ef89a88 100644 --- a/library/net_sockets.c +++ b/library/net_sockets.c
@@ -683,7 +683,7 @@ */ void mbedtls_net_free(mbedtls_net_context *ctx) { - if (ctx->fd == -1) { + if (ctx == NULL || ctx->fd == -1) { return; }