summaryrefslogtreecommitdiff
path: root/nuttx/binfmt
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-09-15 10:15:47 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-09-15 10:15:47 -0600
commit295fce88ee7cc6154172c70d57270c2d4cfb7dac (patch)
tree8fcda50df623d59d98a14a50aed01edd6f810a9e /nuttx/binfmt
parent48b44f4fd3a703486ad0d847f937b4dbde592349 (diff)
downloadnuttx-295fce88ee7cc6154172c70d57270c2d4cfb7dac.tar.gz
nuttx-295fce88ee7cc6154172c70d57270c2d4cfb7dac.tar.bz2
nuttx-295fce88ee7cc6154172c70d57270c2d4cfb7dac.zip
execv() is a basic system interface. It should not be in libc/ but rather in sched/task. Its symboltable helper logic also belongs in the kernel but belings in binfmt/ with the other symbol table logic
Diffstat (limited to 'nuttx/binfmt')
-rw-r--r--nuttx/binfmt/binfmt_execmodule.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/nuttx/binfmt/binfmt_execmodule.c b/nuttx/binfmt/binfmt_execmodule.c
index f2ff5db7a..babd5f1f7 100644
--- a/nuttx/binfmt/binfmt_execmodule.c
+++ b/nuttx/binfmt/binfmt_execmodule.c
@@ -206,9 +206,13 @@ int exec_module(FAR const struct binary_s *binp)
goto errout_with_addrenv;
}
- /* We can free the argument buffer now */
+ /* We can free the argument buffer now.
+ * REVISIT: It is good to free up memory as soon as possible, but
+ * unfortunately here 'binp' is 'const'. So to do this properly, we will
+ * have to make some more extensive changes.
+ */
- binfmt_freeargv(binp);
+ binfmt_freeargv((FAR struct binary_s *)binp);
/* Note that tcb->flags are not modified. 0=normal task */
/* tcb->flags |= TCB_FLAG_TTYPE_TASK; */