Skip to content

Commit

Permalink
[nrfconnect] Fix memory leak in Window Covering sample.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
markaj-nordic committed Feb 9, 2024
1 parent 1913dba commit f7f8892
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/window-app/nrfconnect/main/WindowCovering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,4 +343,6 @@ void WindowCovering::DoPostAttributeChange(intptr_t aArg)
VerifyOrReturn(data != nullptr);

PostAttributeChange(data->mEndpoint, data->mAttributeId);

chip::Platform::Delete(data);
}

0 comments on commit f7f8892

Please sign in to comment.