binfmt_execmodule: If incoming envp is NULL get parent envp
This keeps backwards compatibility with apps that do not provide envp. The old implementation passes NULL always and this change fixes any regression caused by it.
This commit is contained in:
parent
d6ef4849a9
commit
1a7d81c942
@ -153,7 +153,7 @@ int exec_module(FAR const struct binary_s *binp,
|
||||
|
||||
/* Make a copy of the environment here */
|
||||
|
||||
if (envp)
|
||||
if (envp || (envp = get_environ_ptr()))
|
||||
{
|
||||
envp = binfmt_copyenv(envp);
|
||||
if (!envp)
|
||||
|
Loading…
Reference in New Issue
Block a user