Merge branch 'rs/daemon-plug-child-leak' into maint

"git daemon" uses "run_command()" without "finish_command()", so it
needs to release resources itself, which it forgot to do.

* rs/daemon-plug-child-leak:
  daemon: plug memory leak
  run-command: factor out child_process_clear()
This commit is contained in:
Junio C Hamano
2015-11-05 12:18:16 -08:00
4 changed files with 18 additions and 6 deletions

View File

@ -46,6 +46,13 @@ Functions
The argument dir corresponds the member .dir. The argument env
corresponds to the member .env.
`child_process_clear`::
Release the memory associated with the struct child_process.
Most users of the run-command API don't need to call this
function explicitly because `start_command` invokes it on
failure and `finish_command` calls it automatically already.
The functions above do the following:
. If a system call failed, errno is set and -1 is returned. A diagnostic