Blufi example init and deinit memory leak (IDFGH-14055) #14874
Labels
Resolution: Done
Issue is done internally
Status: Done
Issue is done internally
Status: In Progress
Work is in progress
Type: Bug
bugs in IDF
Answers checklist.
IDF version.
v5.4-dev-4076-gce6085349f
Espressif SoC revision.
ESP32-C6 (QFN40) (revision v0.0)
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
None
Power Supply used.
USB
What is the expected behavior?
TL;DR is that I use esp_blufi_host_init and esp_blufi_host_deinit to start and stop NIMBLE blufi with CONFIG_BT_NIMBLE_ENABLED. However, it leaks 272 bytes every time with an init and deinit.
What is the actual behavior?
The root cause is the os_msys_get in esp_blufi.c line 226 and 234 and it never frees the allocated memory in deinit function.
Steps to reproduce.
I just add a workaround myself in components/bt/common/btc/profile/esp/blufi/nimble_host/esp_blufi.c:: bluesp_blufi_btc_deinit since the variables are file scoped in esp_blufi.c and I hope you can patch it in a proper place.
Debug Logs.
No response
More Information.
No response
The text was updated successfully, but these errors were encountered: