Re: [WIP Patch 02/12] Some cleanup in get_refs_via_curl()
- From
Mike Hommey <mh@glandium.org>
- Date
- Jan 18, 2009, 19:30 UTC
- Message-ID
- <20090118193002.GA25134@glandium.org>
- In-Reply-To
- <alpine.DEB.1.00.0901182010380.3586@pacific.mpi-cbg.de>
On Sun, Jan 18, 2009 at 08:11:07PM +0100, Johannes Schindelin wrote:
Show 23 quoted lines
> Hi, > > On Sun, 18 Jan 2009, Johannes Schindelin wrote: > > > On Sun, 18 Jan 2009, Mike Hommey wrote: > > > > > diff --git a/transport.c b/transport.c > > > index 56831c5..6919ff1 100644 > > > --- a/transport.c > > > +++ b/transport.c > > > @@ -508,6 +508,8 @@ static struct ref *get_refs_via_curl(struct transport *transport) > > > free(ref); > > > } > > > > > > + http_cleanup(); > > > + free(refs_url); > > > return refs; > > > } > > > > You cannot http_cleanup() here, as http-push calls that function, but > > continues to want to use curl. > > Worse, a http clone will hit the same issue.
IIRC, it doesn't break anything because getting refs is going to happen at the beginning, and the following http request is going to reinitialize the whole thing.
It is suboptimal, I agree.
Mike