nuttx/libs/libc
yushuailong 166f17746c libc/elf: Always free the module symbol table on removal.
libelf_uninit() only called libelf_freesymtab() when the module had an
uninitializer.  But the exported symbol table is built by
libelf_insertsymtab() for every loaded module, and nothing in the tree
sets modinfo.uninitializer anymore:  modules have registered their
teardown through .fini_array since a9cb28cd23.  The condition is
therefore always false and every rmmod()/dlclose() leaks the exports
array together with the strdup-ed symbol names.

Call libelf_freesymtab() unconditionally, and clear the exports
pointers next to it instead of under a vestigial procfs guard that
dates back to the removed module initializer field.

Assisted-by: OpenAI Codex
Signed-off-by: yushuailong <yyyusl@qq.com>
2026-09-22 13:29:57 +08:00
..
aio
assert
audio
builtin
ctype
dirent
dlfcn
elf libc/elf: Always free the module symbol table on removal. 2026-09-22 13:29:57 +08:00
errno
eventfd
fdt
fixedmath
gdbstub
gnssutils
grp
hex2bin
inttypes
libgen
locale
lzf
machine
misc
net
netdb
obstack
pthread
pwd
queue
regex
sched
search
semaphore
signal
spawn
stdio
stdlib
stream
string
symtab
syslog
termios
time
tls
uio
unistd
userfs
uuid
wchar
wctype
wqueue
zoneinfo
.gitignore
CMakeLists.txt
Kconfig
libc.csv
libc.h
limits_check.c
Makefile