env_dup: fix issue about USE_AFTER_FREE
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
parent
6c4c09eb44
commit
968e89303f
1 changed files with 1 additions and 0 deletions
|
@ -125,6 +125,7 @@ int env_dup(FAR struct task_group_s *group, FAR char * const *envcp)
|
||||||
}
|
}
|
||||||
|
|
||||||
group_free(group, envp);
|
group_free(group, envp);
|
||||||
|
envp = NULL;
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue