From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Hommey Subject: Re: [WIP Patch 02/12] Some cleanup in get_refs_via_curl() Date: Sun, 18 Jan 2009 20:30:02 +0100 Organization: glandium.org Message-ID: <20090118193002.GA25134@glandium.org> References: <20090118074911.GB30228@glandium.org> <1232265877-3649-1-git-send-email-mh@glandium.org> <1232265877-3649-2-git-send-email-mh@glandium.org> <1232265877-3649-3-git-send-email-mh@glandium.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: git@vger.kernel.org, gitster@pobox.com To: Johannes Schindelin X-From: git-owner@vger.kernel.org Sun Jan 18 20:31:44 2009 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1LOdMw-000736-Ak for gcvg-git-2@gmane.org; Sun, 18 Jan 2009 20:31:38 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753547AbZARTaO (ORCPT ); Sun, 18 Jan 2009 14:30:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753518AbZARTaN (ORCPT ); Sun, 18 Jan 2009 14:30:13 -0500 Received: from vuizook.err.no ([85.19.221.46]:60474 "EHLO vuizook.err.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752888AbZARTaM (ORCPT ); Sun, 18 Jan 2009 14:30:12 -0500 Received: from cha92-13-88-165-248-19.fbx.proxad.net ([88.165.248.19] helo=jigen) by vuizook.err.no with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1LOdLP-0004vv-TE; Sun, 18 Jan 2009 20:30:07 +0100 Received: from mh by jigen with local (Exim 4.69) (envelope-from ) id 1LOdLO-0006lh-73; Sun, 18 Jan 2009 20:30:02 +0100 Content-Disposition: inline In-Reply-To: X-GPG-Fingerprint: A479 A824 265C B2A5 FC54 8D1E DE4B DA2C 54FD 2A58 User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Status: (score 0.1): No, score=0.1 required=5.0 tests=RDNS_DYNAMIC autolearn=disabled version=3.2.4 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Sun, Jan 18, 2009 at 08:11:07PM +0100, Johannes Schindelin wrote: > 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