Files
esp-idf/components/esp_event/test_apps
Konstantin Kondrashov 82e6c831e7 fix(esp_event): free queued legacy cleanup ctx on loop delete
When a loop is deleted while an internal legacy "cleanup" event is still
queued (posted by a deferred self-unregistration from within a handler),
esp_event_loop_delete() drained the queue but only freed the post payload,
leaking the heap copy of the handler context allocated for the legacy path.

Free ctx->handler_ctx for queued legacy cleanup events while draining the
queue, mirroring the cleanup done in esp_event_loop_run().

Add a regression test that leaves a legacy cleanup event queued and asserts
no memory is leaked on loop deletion.
2026-07-21 15:33:47 +03:00
..

Supported Targets ESP32 ESP32-C3 ESP32-S2 Linux

For testing on linux, please deactivate the task stack overflow watchpoint