mongoose-os-libs/bt-common

Memory leak with mgos_bt_gattc_write()

Opened this issue · 0 comments

I'm seeing memory leaks with mgos_bt_gattc_write(). In my project, this function is being called periodically every 100 to 500ms. I see mgos_get_min_free_heap_size() reducing after sometime. If I disable calling mgos_bt_gattc_write(), I don't see any leaks. I couldn't find anything suspicious in that function or even in the underlying esp's BT function.

Setup:
ESP32 BT Mode: Central and Peripheral Role
Wi-Fi is Enabled, MQTT is disabled.
RPC-HTTP Server is Enabled to received RPC commands over IP.
HTTP Client is enabled to post metrics data(received via Bluetooth Notifications)
mDash, sntp, cron, fstab and vfs-fs-lfs are used