Call child_process_clear() when a child ends to release the memory
allocated for its environment. This is necessary because unlike all
other users of start_command() we don't call finish_command(), which
would have taken care of that for us.
This leak was introduced by
f063d38b (daemon: use cld->env_array
when re-spawning).
Signed-off-by: Rene Scharfe <redacted>
Signed-off-by: Junio C Hamano <redacted>
/* remove the child */
*cradle = blanket->next;
live_children--;
+ child_process_clear(&blanket->cld);
free(blanket);
} else
cradle = &blanket->next;