aboutsummaryrefslogtreecommitdiffstats
path: root/http-fetch.c
diff options
context:
space:
mode:
authorMark Wooding <mdw@distorted.org.uk>2006-02-01 11:44:28 +0000
committerJunio C Hamano <junkio@cox.net>2006-02-05 16:49:16 -0800
commit09db444fdbf647c95de698d243425a7700b91b2f (patch)
tree3c413e5b3499628b6d661b4aee88063f7046f7e3 /http-fetch.c
parentdf9892ffce46d1f1bd6fe64aa445be2ffe7346cf (diff)
downloadgit-09db444fdbf647c95de698d243425a7700b91b2f.tar.gz
http-fetch: Fix object list corruption in fill_active_slots().
In fill_active_slots() -- if we find an object which has already arrived, say as part of a pack, /don't/ remove it from the list. It's already been prefetched and someone will ask for it later. Just label it as done and carry blithely on. (As it was, the code would dereference a freed object to continue through the list anyway.) Signed-off-by: Mark Wooding <mdw@distorted.org.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'http-fetch.c')
-rw-r--r--http-fetch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/http-fetch.c b/http-fetch.c
index 72edf28b00..7b1b2a02dc 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -311,7 +311,7 @@ void fill_active_slots(void)
while (active_requests < max_requests && obj_req != NULL) {
if (obj_req->state == WAITING) {
if (has_sha1_file(obj_req->sha1))
- release_object_request(obj_req);
+ obj_req->state = COMPLETE;
else
start_object_request(obj_req);
curl_multi_perform(curlm, &num_transfers);