cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: bug in curl_formget()

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 13 Jun 2011 10:23:50 +0200 (CEST)

On Fri, 10 Jun 2011, Aaron Orenstein wrote:

> // BUG: this function currently never calls fclose() on the
> TEMP_FILE_NAME file
> curl_formget(postFirst, NULL, &StaticFormGetCallback);

I've read this code a couple of times now and I'm puzzled. You say here that
this function doesn't fclose() the file so that remains open afterwards and
thus the unlink() of it fails.

What I don't get is how the patches you proposed previously address this
issue.

I haven't really understood how it comes that the file remains open in the
situation you've described (and I don't have any windows machines to test this
on) but wouldn't the attached patch be more appropriate if that is really the
problem?

-- 
  / daniel.haxx.se


-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2011-06-13