git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] http-push: fix double free()

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 17, 2008, 19:45 UTC
Message-ID
<alpine.LSU.1.00.0801171943360.5731@racer.site>

There was an extra free(url) in remote_exists() (both if clauses before that contain a free(url) already), which resulted in a crash on Windows.

Noticed by Nigel Magnay.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
	This fixes Issue 71 of msysGit, as far as I can tell.
 http-push.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/http-push.c b/http-push.c
index 64be904..a78e0a9 100644
--- a/http-push.c
+++ b/http-push.c
@@ -1991,7 +1991,6 @@ static int remote_exists(const char *path)
 		fprintf(stderr, "Unable to start HEAD request\n");
 	}
 
-	free(url);
 	return ret;
 }
 
-- 
1.5.3.6.2304.gbc8e45-dirty
Next: Mike Hommey
Message 1 of 4 in “http-push: fix double free()”
  1. http-push: fix double free()Johannes Schindelin, Jan 17, 2008
  2. Mike HommeyJan 18, 2008
  3. Johannes SchindelinJan 18, 2008
  4. Johannes SchindelinJan 18, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.