libelf/elf_addrenv_free(): Don't instantiate address environment prior to destroying it

Same as with group_free(), there is no need to instantiate the address
environment to destroy it.

The only problem was the ARM implementation modified the L1 mappings
in up_addrenv_destroy(), which it no longer does.
This commit is contained in:
Ville Juven 2023-01-17 17:53:53 +02:00 committed by Xiang Xiao
parent 201a55c7cb
commit fb12b6e3a9

View File

@ -259,9 +259,7 @@ void elf_addrenv_free(FAR struct elf_loadinfo_s *loadinfo)
/* Free the address environment */
elf_addrenv_select(loadinfo);
ret = up_addrenv_destroy(&loadinfo->addrenv);
elf_addrenv_restore(loadinfo);
if (ret < 0)
{
berr("ERROR: up_addrenv_destroy failed: %d\n", ret);