]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
don't close the trace stream until _after_ the easy handle has been cleaned
authorDaniel Stenberg <daniel@haxx.se>
Thu, 1 Jul 2004 06:19:19 +0000 (06:19 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 1 Jul 2004 06:19:19 +0000 (06:19 +0000)
up, as that can send traces too

src/main.c

index 126fa4af0ad8d139fcfc61021dfc4f898ae23199..6d8a21bf0e334333ed076bf735e65186a153bc5e 100644 (file)
@@ -3558,15 +3558,15 @@ operate(struct Configurable *config, int argc, char *argv[])
   if(config->headerfile && !headerfilep && heads.stream)
     fclose(heads.stream);
 
-  if(config->trace_fopened && config->trace_stream)
-    fclose(config->trace_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);
+
   if(config->errors_fopened)
     fclose(config->errors);