Re: [PATCH 1/5] submodule_move_head: fix leak of struct child_process
- From
Stefan Beller <sbeller@google.com>
- Date
- May 2, 2017, 04:20 UTC
- Message-ID
- <CAGZ79kYC9sycR_R-EM0jFA2YrMjA6jZvXqQud7ShPziW6WaMBA@mail.gmail.com>
- In-Reply-To
- <xmqqpofsdkim.fsf@gitster.mtv.corp.google.com>
On Mon, May 1, 2017 at 8:07 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 16 quoted lines
> Brandon Williams <bmwill@google.com> writes: > >> On 05/01, Stefan Beller wrote: >>> While fixing the leak of `cp`, reuse it instead of having to declare >>> another struct child_process. >>> >>> Signed-off-by: Stefan Beller <sbeller@google.com> >> >> This shouldn't be needed as 'finish_command' does the cleanup for you by >> calling 'child_prcoess_clear()'. > > Yes, indeed. > > It might not hurt to update the code so that the cp is reused in the > second run instead of using a separate instance cp1, but that is a > topic separate from fixing a non-existing leak.
ok, I'll drop the patch and may send another patch later for re-using cp
Thanks, Stefan