yushuailong opened a new pull request, #20222:
URL: https://github.com/apache/nuttx/pull/20222
## Summary
Fix two resource leaks in the ELF module removal path.
* Free the module registry entry after removing it from the registry.
* Free the exported module symbol table unconditionally during
`libelf_uninit()`.
The registry entry was removed from the registry but never released.
In addition, the exported symbol table was only freed when the module had
an uninitializer. Modules now normally register teardown through `.fini_array`,
so that condition is generally false and the exported symbols remained
allocated after `rmmod()` or `dlclose()`.
## Impact
bug fix only
## Testing
Build host: macOS 26.6.2 ARM64, Apple Clang 21.0.0.
Target: sim:ostest.
Build: make completes successfully with LD: nuttx.
Static checks: nxstyle, checkpatch pass.
Runtime smoke test: ./nuttx starts and proceeds through enabled OSTest cases
without an assertion in the observed run.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]