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>
Mark Wooding committed
Feb 1, 2006 at 11:44 UTC
09db444fdbf647c95de698d243425a7700b91b2f
1 file changed
+1
-1
http-fetch.c
+1
-1
@@ -311,7 +311,7 @@ void fill_active_slots(void)
311
while (active_requests < max_requests && obj_req != NULL) {
312
if (obj_req->state == WAITING) {
313
if (has_sha1_file(obj_req->sha1))
314
- release_object_request(obj_req);
314
+ obj_req->state = COMPLETE;
315
else
316
start_object_request(obj_req);
317
curl_multi_perform(curlm, &num_transfers);