diff --git a/sched/environ/env_dup.c b/sched/environ/env_dup.c index c588aa8376..3e3be281e8 100644 --- a/sched/environ/env_dup.c +++ b/sched/environ/env_dup.c @@ -125,6 +125,7 @@ int env_dup(FAR struct task_group_s *group, FAR char * const *envcp) } group_free(group, envp); + envp = NULL; ret = -ENOMEM; break; }