@tarruda Why not move this call and the call `shell_free_argv` from `job_exit_event` to `close_cb` in job.c.  Then the job module can always take care of the free and the whole `cleanup:`-block can be removed (also replace `goto cleanup;`, see above).