mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user