job: No longer free the job data. It's now done by the exit callback

This commit is contained in:
Thiago de Arruda
2014-06-26 15:55:20 -03:00
parent c19b8404a7
commit bce4c365bc
3 changed files with 2 additions and 7 deletions

View File

@@ -19085,6 +19085,7 @@ static void on_job_stderr(RStream *rstream, void *data, bool eof)
static void on_job_exit(Job *job, void *data)
{
apply_job_autocmds(job, data, "exit", NULL);
free(data);
}
static void on_job_data(RStream *rstream, void *data, bool eof, char *type)

View File

@@ -92,7 +92,7 @@ uint64_t channel_from_job(char **argv)
channel,
job_out,
job_err,
job_exit,
NULL,
true,
0,
&status);
@@ -275,11 +275,6 @@ static void job_err(RStream *rstream, void *data, bool eof)
// TODO(tarruda): plugin error messages should be sent to the error buffer
}
static void job_exit(Job *job, void *data)
{
// TODO(tarruda): what should be done here?
}
static void parse_msgpack(RStream *rstream, void *data, bool eof)
{
Channel *channel = data;

View File

@@ -408,7 +408,6 @@ static void close_cb(uv_handle_t *handle)
rstream_free(job->err);
wstream_free(job->in);
shell_free_argv(job->proc_opts.args);
free(job->data);
free(job);
}
}