summaryrefslogtreecommitdiff
path: root/common_modules/module_lib/src/txm_queue_send_notify.c
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-08-08 08:01:38 -0400
committerGitHub <[email protected]>2026-08-08 08:01:38 -0400
commitbd8d30f23b2f968da052092f59a7298fdc073c4e (patch)
tree84a37fb1c37a143d66a90606159f451b91b340fe /common_modules/module_lib/src/txm_queue_send_notify.c
parentf84dd3d2aa51872cf5b642319a42d156a28ba1a5 (diff)
Fixed code_buffer leak in the module converter utilities (#581)
The host-side module converter utilities allocated code_buffer inside the loop over the ELF code sections and never released it, so every code section in the input ELF leaked one buffer. The malloc() result was also unchecked, so a failed allocation passed a null pointer on to elf_object_read() and crashed the tool. Release the buffer at the end of each iteration and report a clean failure with exit code 5 when the allocation does not succeed. Verified with AddressSanitizer on a two-code-section input: 128 bytes leaked in 2 allocations before, none after, with byte-identical output. Fixes https://github.com/eclipse-threadx/threadx/issues/571 Assisted-by: Claude Code (Opus 5) <[email protected]>
Diffstat (limited to 'common_modules/module_lib/src/txm_queue_send_notify.c')
0 files changed, 0 insertions, 0 deletions