Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
In cookie.c in function Curl_cookie_output in case of fatal error (condition format_ptr == NULL, line 1004, version 7.19.2) fclose is performed without cheking use_stdout flag. So in case error stdout FILE* handle can be closed.
Thanks for the report, this problem is now fixed in CVS!