summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2010-04-17 20:07:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-04-17 20:55:45 (GMT)
commit03b6aeb27443f117a3d8375f01bc38baeeff65a5 (patch)
tree7dae2836758a59be2841541a4b542f50e945ff0a /http.c
parentf78683f3a85ca16ae16e1180703d3280b272f45d (diff)
downloadgit-03b6aeb27443f117a3d8375f01bc38baeeff65a5.zip
git-03b6aeb27443f117a3d8375f01bc38baeeff65a5.tar.gz
git-03b6aeb27443f117a3d8375f01bc38baeeff65a5.tar.bz2
http.c: Remove bad free of static block
The filename variable here is pointing to a block of memory that was allocated by sha1_file.c and is also held in a static variable scoped within the sha1_pack_name() function. Doing a free() here is returning that memory to the allocator while we might still try to reuse it on a subsequent sha1_pack_name() invocation. That's not acceptable, so don't free it. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.c')
-rw-r--r--http.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/http.c b/http.c
index deab595..9526491 100644
--- a/http.c
+++ b/http.c
@@ -1082,7 +1082,6 @@ struct http_pack_request *new_http_pack_request(
return preq;
abort:
- free(filename);
free(preq->url);
free(preq);
return NULL;