env_dup: fix issue about USE_AFTER_FREE

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
dongjiuzhu1 2023-10-12 16:06:20 +08:00 committed by Xiang Xiao
parent 6c4c09eb44
commit 968e89303f
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}