env_dup: fix issue about USE_AFTER_FREE
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
parent
6c4c09eb44
commit
968e89303f
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue