From: Sean Date: Sat, 20 May 2006 22:46:33 +0000 (-0400) Subject: Remove possible segfault in http-fetch. X-Git-Tag: v1.4.0-rc1~20^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=07001f95a60149619bed62af7ad59052ace7ac92;p=git.git Remove possible segfault in http-fetch. 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 Signed-off-by: Junio C Hamano --- diff --git a/http-fetch.c b/http-fetch.c index 861644b27..178f1ee31 100644 --- a/http-fetch.c +++ b/http-fetch.c @@ -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"