Skip to content

Commit 7d8823a

Browse files
[nrfconnect] Fix memory leak in Window Covering sample. (project-chip#32041)
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 <marcin.kajor@nordicsemi.no>
1 parent 10d1409 commit 7d8823a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/window-app/nrfconnect/main/WindowCovering.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -343,4 +343,6 @@ void WindowCovering::DoPostAttributeChange(intptr_t aArg)
343343
VerifyOrReturn(data != nullptr);
344344

345345
PostAttributeChange(data->mEndpoint, data->mAttributeId);
346+
347+
chip::Platform::Delete(data);
346348
}

0 commit comments

Comments
 (0)