You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/01/18 03:02:28 UTC
[nuttx] 03/03: libelf/elf_addrenv_free(): Don't instantiate address environment prior to destroying it
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit fb12b6e3a99f038bc7a36d96adb394041a34e845
Author: Ville Juven <vi...@unikie.com>
AuthorDate: Tue Jan 17 17:53:53 2023 +0200
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.
---
binfmt/libelf/libelf_addrenv.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/binfmt/libelf/libelf_addrenv.c b/binfmt/libelf/libelf_addrenv.c
index 035e498ade..3e44d2eab0 100644
--- a/binfmt/libelf/libelf_addrenv.c
+++ b/binfmt/libelf/libelf_addrenv.c
@@ -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);