1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-01 12:19:28 +00:00

Plug minor memory leak of module_t structures when unloading a file

from the kernel.

Reviewed By: Doug Rabson (dfr@)
This commit is contained in:
Peter Edwards 2004-04-09 15:27:38 +00:00
parent c97ed2df4e
commit 24554d00bc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=128057

View File

@ -515,8 +515,10 @@ linker_file_unload(linker_file_t file)
}
for (ml = TAILQ_FIRST(&found_modules); ml; ml = nextml) {
nextml = TAILQ_NEXT(ml, link);
if (ml->container == file)
if (ml->container == file) {
TAILQ_REMOVE(&found_modules, ml, link);
free(ml, M_LINKER);
}
}
/*