fprintf(config->errors, "curl: (%d) %s\n", res, errorbuffer);
#endif
- if((config->errors != stderr) &&
- (config->errors != stdout))
- /* it wasn't directed to stdout or stderr so close the file! */
- fclose(config->errors);
-
if(config->headerfile && !headerfilep && heads.stream)
fclose(heads.stream);
/* cleanup the curl handle! */
curl_easy_cleanup(curl);
+ if((config->errors != stderr) &&
+ (config->errors != stdout))
+ /* it wasn't directed to stdout or stderr so close the file! */
+ fclose(config->errors);
+
main_free(); /* cleanup */
return res;