Binfmt no longer depends on a fixed sized argv[] list

This commit is contained in:
Gregory Nutt
2014-11-12 18:31:32 -06:00
parent fcffafee30
commit 7c119ba787
3 changed files with 44 additions and 16 deletions
+7 -1
View File
@@ -228,13 +228,19 @@ int unload_module(FAR struct binary_s *binp)
#if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_BUILD_KERNEL)
void binfmt_freeargv(FAR struct binary_s *binp)
{
/* Is there an allocated argument buffer */
if (binp->argbuffer)
{
/* Free the argument buffer */
kmm_free(binp->argbuffer);
binp->argbuffer = NULL;
}
/* Nullify the allocated argv[] array and the argument buffer pointers */
binp->argbuffer = (FAR char *)NULL;
binp->argv = (FAR char **)NULL;
}
#endif