job: Fix memory leak in job_start().

If a new job cannot be started because no slots are free, we return early
without freeing the argv argument.
This commit is contained in:
oni-link 2014-11-07 19:13:47 +01:00
parent c9df7ba308
commit 70cb863096

View File

@ -139,6 +139,7 @@ Job *job_start(char **argv,
if (i == MAX_RUNNING_JOBS) {
// No free slots
shell_free_argv(argv);
*status = 0;
return NULL;
}