Code

Remove possible segfault in http-fetch.
authorSean <seanlkml@sympatico.ca>
Sat, 20 May 2006 22:46:33 +0000 (18:46 -0400)
committerJunio C Hamano <junkio@cox.net>
Tue, 23 May 2006 01:52:58 +0000 (18:52 -0700)
Free the curl string lists after running http_cleanup to
avoid an occasional segfault in the curl library.  Seems
to only occur if the website returns a 405 error.

Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
Signed-off-by: Junio C Hamano <junkio@cox.net>
http-fetch.c

index 861644b27ee0c01a780b68daa43c259dd978a538..178f1ee311dd7db8ad6c2d10babde1a8c8fe7ebd 100644 (file)
@@ -1269,10 +1269,10 @@ int main(int argc, char **argv)
        if (pull(commit_id))
                rc = 1;
 
-       curl_slist_free_all(no_pragma_header);
-
        http_cleanup();
 
+       curl_slist_free_all(no_pragma_header);
+
        if (corrupt_object_found) {
                fprintf(stderr,
 "Some loose object were found to be corrupt, but they might be just\n"