Merge pull request #987 from oni-link/fix_some_memory_leaks

Fix some memory leaks in job.c and provider.c
This commit is contained in:
Justin M. Keyes 2014-07-24 10:39:43 -04:00
commit cbe1864ab4
2 changed files with 9 additions and 0 deletions

View File

@ -402,6 +402,14 @@ static void close_cb(uv_handle_t *handle)
rstream_free(job->out);
rstream_free(job->err);
wstream_free(job->in);
// Free data memory of process and pipe handles, that was allocated
// by handle_set_job in job_start.
free(job->proc.data);
free(job->proc_stdin.data);
free(job->proc_stdout.data);
free(job->proc_stderr.data);
shell_free_argv(job->proc_opts.args);
free(job);
}

View File

@ -109,6 +109,7 @@ Object provider_call(char *method, Object arg)
"Provider for \"%s\" is not available",
method);
report_error(buf);
msgpack_rpc_free_object(arg);
return NIL;
}