process-util: Assert we don't finalize twice

Make sure that we only try to finalize once.

Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Daniel Stone 2022-07-12 14:40:13 +01:00 committed by Pekka Paalanen
parent b685e075cd
commit 3af823b69b

View file

@ -140,6 +140,8 @@ custom_env_get_envp(struct custom_env *env)
{
char **ep;
assert(!env->finalized);
/* add terminating NULL */
ep = wl_array_add(&env->p, sizeof *ep);
assert(ep);