From 5b10e190d08b263d81472511b58e46e54eb62d63 Mon Sep 17 00:00:00 2001 From: XavierChanth Date: Mon, 23 Dec 2024 14:40:49 -0500 Subject: [PATCH] fix: memory leak --- packages/atclient/src/socket_mbedtls.c | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/atclient/src/socket_mbedtls.c b/packages/atclient/src/socket_mbedtls.c index b96180d6..f545d5a0 100644 --- a/packages/atclient/src/socket_mbedtls.c +++ b/packages/atclient/src/socket_mbedtls.c @@ -334,6 +334,7 @@ int atclient_tls_socket_read_until_char(struct atclient_tls_socket *socket, unsi // async error, we need to try again break; case MBEDTLS_ERR_SSL_TIMEOUT: + free(recv); return ATCLIENT_SSL_TIMEOUT_EXITCODE; break; // unexpected errors while reading