Fix fd leak in http-fetch
authorNick Hengeveld <nickh@reactrix.com>
Sat, 12 Nov 2005 17:38:28 +0000 (09:38 -0800)
committerJunio C Hamano <junkio@cox.net>
Sun, 13 Nov 2005 07:43:11 +0000 (23:43 -0800)
Added a call to finish_request to clean up resources if the server
returned a 404 and there are no alternates left to try.

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
http-fetch.c

index 99b6cc7..b8aa965 100644 (file)
@@ -632,6 +632,8 @@ static void process_curl_messages(void)
                                                request->repo =
                                                        request->repo->next;
                                                start_request(request);
+                                       } else {
+                                               finish_request(request);
                                        }
                                } else {
                                        finish_request(request);