mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-09-13 05:39:57 +00:00
Fix NULL argument handling in mbedtls_xxx_free() functions
Signed-off-by: Troy-Butler <[email protected]>
This commit is contained in:
@@ -683,7 +683,7 @@ void mbedtls_net_close(mbedtls_net_context *ctx)
|
||||
*/
|
||||
void mbedtls_net_free(mbedtls_net_context *ctx)
|
||||
{
|
||||
if (ctx->fd == -1) {
|
||||
if (ctx == NULL || ctx->fd == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user