Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nrf fromlist] [app] Fix DeferredAttributePersister memory leak #369

Merged
merged 2 commits into from
Dec 22, 2023

Conversation

Damian-Nordic
Copy link
Contributor

@Damian-Nordic Damian-Nordic commented Dec 18, 2023

ScopedMemoryBuffer's Release() method was used instead of Free(). Add CHECK_RETURN_VALUE annotation to the Release() method to prevent from making such a mistake in the future.

Also, add a mechanism to trace memory allocations.

Damian-Nordic and others added 2 commits December 22, 2023 09:15
* [app] Fix DeferredAttributePerister memory leak

ScopedMemoryBuffer's Release() method was used instead of
Free(). Add CHECK_RETURN_VALUE annotation to the Release()
method to prevent from making such a mistake in the future.

Signed-off-by: Damian Krolik <[email protected]>

* Code review

---------

Signed-off-by: Damian Krolik <[email protected]>
When CONFIG_CHIP_MALLOC_SYS_HEAP_DEBUG is enabled, log
every malloc/realloc/free to trace the source of memory
leaks in the application.
@Damian-Nordic Damian-Nordic merged commit 5f7a9f6 into nrfconnect:master Dec 22, 2023
8 checks passed
@Damian-Nordic Damian-Nordic deleted the deferred-leak branch December 22, 2023 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants