From f7f889261ddf2fdb101780e96472cc2851fc8298 Mon Sep 17 00:00:00 2001 From: Marcin Kajor Date: Fri, 9 Feb 2024 16:13:39 +0100 Subject: [PATCH] [nrfconnect] Fix memory leak in Window Covering sample. We were leaking 8 bytes each time the new attribute change was reported by the WindowCovering Server. It was resulting in running out of heap when stressing the device (by sending multiple up-or-open/down-or-close commands). Signed-off-by: Marcin Kajor --- examples/window-app/nrfconnect/main/WindowCovering.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/window-app/nrfconnect/main/WindowCovering.cpp b/examples/window-app/nrfconnect/main/WindowCovering.cpp index f2d078838a427b..a11104fe2ad89b 100644 --- a/examples/window-app/nrfconnect/main/WindowCovering.cpp +++ b/examples/window-app/nrfconnect/main/WindowCovering.cpp @@ -343,4 +343,6 @@ void WindowCovering::DoPostAttributeChange(intptr_t aArg) VerifyOrReturn(data != nullptr); PostAttributeChange(data->mEndpoint, data->mAttributeId); + + chip::Platform::Delete(data); }