Re: Git crashes on pull
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 15, 2009, 19:22 UTC
- Message-ID
- <7vljkg57xs.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <alpine.LSU.2.01.0909152044450.10936@bianca.dialin.t-online.de>
Guido Ostkamp <git@ostkamp.fastmail.fm> writes:
Show 11 quoted lines
> I have a clone of http://git.postgresql.org/git/postgresql.git where > head is at commit 167501570c74390dfb7a5dd71e260ab3d4fd9904. > > I'm using Git version 1.6.5.rc1.10.g20f34 (should be at commit > 20f34902d154f390ebaa7eed7f42ad14140b8acb from Mon Sep 14 10:49:01 2009 > +0200) > > Now when I 'git pull' then Git crashes with > > git pull 2>&1 > /tmp/git-error > *** glibc detected *** git-remote-curl: free(): invalid pointer:
Please try this patch, which I have been preparing for later pushout.
From: Junio C Hamano <gitster@pobox.com> Date: Mon, 14 Sep 2009 14:48:15 -0700 Subject: [PATCH] http.c: avoid freeing an uninitialized pointer
An earlier 59b8d38 (http.c: remove verification of remote packs) left the variable "url" uninitialized; "goto cleanup" codepath can free it which is not very nice.
Signed-off-by: Junio C Hamano <gitster@pobox.com> --- http.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/http.c b/http.c index d0cc1b3..15926d8 100644 --- a/http.c +++ b/http.c @@ -866,7 +866,7 @@ static int fetch_pack_index(unsigned char *sha1, const char *base_url) int ret = 0; char *hex = xstrdup(sha1_to_hex(sha1)); char *filename; - char *url; + char *url = NULL; struct strbuf buf = STRBUF_INIT; if (has_pack_index(sha1)) {
-- 1.6.5.rc1