casaroli commented on code in PR #21898:
URL: https://github.com/apache/nuttx/pull/21898#discussion_r4591467897


##########
binfmt/binfmt_execmodule.c:
##########
@@ -477,6 +478,14 @@ int exec_module(FAR struct binary_s *binp,
   binfmt_freeargv(argv, binp->argv);
 errout_with_tcb:
   kmm_free(tcb);
+
+#ifdef CONFIG_ARCH_ADDRENV
+  /* No task got the address environment of the program: release it */
+
+  addrenv_drop(binp->addrenv, false);

Review Comment:
   Done.



##########
binfmt/binfmt_execmodule.c:
##########
@@ -435,16 +435,35 @@ int exec_module(FAR struct binary_s *binp,
 
   return pid;
 
+#ifdef CONFIG_ARCH_ADDRENV
+errout_with_attach:
+#  ifdef CONFIG_BUILD_KERNEL
+  /* The address environment of the new task is still selected */
+
+  addrenv_restore(binp->oldenv);

Review Comment:
   Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to