I'm working on a project using the ESP32 and the netconn api. While servicing incoming data on a connection, I've observed a continuous memory leak of 40 bytes on each iteration of a while loop.
I've commented out most of the code in order to trace the issue until all that remained from the original code was the below featured code. Apparently the issue is coming from the netconn_recv function, as on commenting that out there are no more memory leaks.
Code: Select all
while (1)
{
inbuf = netbuf_new();
err = netconn_recv(conn, &inbuf);
ESP_LOGE(TAG, "Remaining space on RAM: %d", esp_get_free_heap_size());
netbuf_delete(inbuf);
}