From 4d8e564b1634aed133256d229e1360d7a8663d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20L=C3=BCthi?= <128356458+se-stefan@users.noreply.github.com> Date: Thu, 3 Oct 2024 08:17:52 +0200 Subject: [PATCH] Fix memory leak in case uAtClientUnlock returns failure --- cell/src/u_cell_http.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cell/src/u_cell_http.c b/cell/src/u_cell_http.c index a03321c0..54d751a6 100644 --- a/cell/src/u_cell_http.c +++ b/cell/src/u_cell_http.c @@ -628,6 +628,9 @@ int32_t uCellHttpOpen(uDeviceHandle_t cellHandle, const char *pServerName, // Free memory uPortFree(pHttpInstance); } + } else { + // Free memory + uPortFree(pHttpInstance); } } // Free temporary memory