From: Daniel Stenberg Date: Wed, 7 Sep 2005 11:05:34 +0000 (+0000) Subject: Ben Madsen reported a problem that only seemed to occur with certain specific X-Git-Tag: curl-7_15_0~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2164d760b78f3813171aa3ca3adb70f33e292c08;p=thirdparty%2Fcurl.git Ben Madsen reported a problem that only seemed to occur with certain specific glibc versions, and with this patch applied it no longer shows up to me. The problem was indeed a flaw that made curl use a file handle already closed. --- diff --git a/src/main.c b/src/main.c index 7ab1c94e68..dd197c7797 100644 --- a/src/main.c +++ b/src/main.c @@ -4159,15 +4159,15 @@ quit_curl: if (config->engine) free(config->engine); + /* cleanup the curl handle! */ + curl_easy_cleanup(curl); + if(config->headerfile && !headerfilep && heads.stream) fclose(heads.stream); if(allocuseragent) free(config->useragent); - /* cleanup the curl handle! */ - curl_easy_cleanup(curl); - if(config->trace_fopened && config->trace_stream) fclose(config->trace_stream);