]> granicus.if.org Git - git/commitdiff
Merge branch 'rs/daemon-plug-child-leak' into maint
authorJunio C Hamano <gitster@pobox.com>
Thu, 5 Nov 2015 20:18:16 +0000 (12:18 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 5 Nov 2015 20:18:17 +0000 (12:18 -0800)
"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()

1  2 
daemon.c
run-command.c
run-command.h

diff --cc daemon.c
Simple merge
diff --cc run-command.c
index e09275bd9e360ee7683ef5d3753ccfe753ee8dcc,fc391fb9cdd6977e8e40d00d2c6142fb824f99d1..84e4ce66e9d3da22be318813d75cbb3a94b614e4
@@@ -539,9 -553,8 +543,8 @@@ fail_pipe
  
  int finish_command(struct child_process *cmd)
  {
 -      int ret = wait_or_whine(cmd->pid, cmd->argv[0]);
 +      int ret = wait_or_whine(cmd->pid, cmd->argv[0], 0);
-       argv_array_clear(&cmd->args);
-       argv_array_clear(&cmd->env_array);
+       child_process_clear(cmd);
        return ret;
  }
  
diff --cc run-command.h
Simple merge