Re: [PATCH 1/3] connect: treat generic proxy processes like ssh processes
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 16, 2011, 23:12 UTC
- Message-ID
- <7vy626i6j1.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <4DD181C6.4020104@kdbg.org>
Johannes Sixt <j6t@kdbg.org> writes:
Show 6 quoted lines
> At this point, proxy->argv would point to automatic storage; but we > need argv[0] in finish_command() for error reporting. In my > implementation, I xmalloced the pointer array and leaked it. (And > that's probably the reason that I never submitted the patch.) I > wouldn't dare to make argv just static because this limits us to have > just one open connection at a time established via git_proxy_connect().
Good point. If we really care, I would imagine that struct child_process can gain a boolean flag to tell finish_command() that the argv[] needs, so I do not think leakage here is such a big deal.
Will squash all three hunks in. Assuming no_fork first and updating conn as we discover what kind of URL we have feels natural.
Thanks, both.