curl-library
Re: [patch] libcurl 7.12.2-20040917 and CURLOPT_VERBOSE may read free()ed data
Date: Wed, 29 Sep 2004 11:16:09 +0200 (CEST)
On Wed, 29 Sep 2004, Bertrand Demiddelaer wrote:
> Well, I made the unlock conditionnal in Curl_done() but it is the same
> condition which triggers the call to Curl_disconnect() in Curl_done(). So,
> putting an unconditionnal call to unlock in Curl_disconnect() won't change
> the behaviour, comparing to my fix.
Then you are mistakenly thinking that the only call to Curl_disconnect() is
that single one from within the Curl_done() function. It isn't!
Curl_done() gets called after each transfer on a connection, while
Curl_disconnect() is called when the connection is disconnected after one or
more transfers.
> As you seem to disagree with this patch, I made tests this morning with
> verbosed pruning functions: my entries do get pruned (and they really get
> pruned when the socket disconnects).
I fail to understand how that is possible. Unless the connection is told to
get closed, you don't call resolv_unlock() for that dns entry. Why isn't that
entry then remaining locked?
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-09-29