binfmt: Call up_module_text_free() in unload_module()

Summary:
- I noticed that up_module_text_free() is not called
  if CONFIG_ARCH_USE_MODULE_TEXT=y
- This commit fixes this issue

Impact:
- None

Testing:
- Tested with spresense

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Masayuki Ishikawa 2021-06-04 10:51:26 +09:00 committed by Xiang Xiao
parent f0b689a063
commit 304d72ed00

View File

@ -166,7 +166,11 @@ int unload_module(FAR struct binary_s *binp)
if (binp->alloc[i])
{
binfo("Freeing alloc[%d]: %p\n", i, binp->alloc[i]);
#if defined(CONFIG_ARCH_USE_MODULE_TEXT)
up_module_text_free((FAR void *)binp->alloc[i]);
#else
kumm_free((FAR void *)binp->alloc[i]);
#endif
}
}