Provide the full module path to preload_delete_name().

The basename will never match against the preload metadata, so these
calls previously had no effect.

Reviewed by:	kib, royger
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D16330
This commit is contained in:
Mark Johnston 2018-07-19 19:50:42 +00:00
parent 7679e49dd4
commit 73624a804a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=336504
2 changed files with 4 additions and 4 deletions

View File

@ -1168,8 +1168,8 @@ link_elf_unload_file(linker_file_t file)
static void
link_elf_unload_preload(linker_file_t file)
{
if (file->filename != NULL)
preload_delete_name(file->filename);
if (file->pathname != NULL)
preload_delete_name(file->pathname);
}
static const char *

View File

@ -1038,8 +1038,8 @@ link_elf_unload_file(linker_file_t file)
free(ef->ctftab, M_LINKER);
free(ef->ctfoff, M_LINKER);
free(ef->typoff, M_LINKER);
if (file->filename != NULL)
preload_delete_name(file->filename);
if (file->pathname != NULL)
preload_delete_name(file->pathname);
/* XXX reclaim module memory? */
return;
}