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