curl-library
Re: Crash in curl_easy_cleanup
Date: Mon, 01 Jan 2007 12:07:45 -0500
On Sun, 2006-12-31 at 19:55 -0500, Braden McDaniel wrote:
> I have the following loop to see what transfers are complete:
[snip]
> I get a crash in response to the call to curl_easy_cleanup at the end of
> the loop. Clearly I'm Doing It Wrong; however, the Right way to do this
> isn't clear to me. The documentation indicates that the easy handle is
> usable on its own after being removed from the multi handle; so
> presumably I need to call curl_easy_cleanup on it (right?). But if it's
> not safe to do that at this point, when is it safe to do?
Nevermind. I realize now that my call to curl_multi_remove_handle
invalidates the data msg points to; assigning msg->easy_handle to a
temporary variable before doing so (and calling curl_easy_cleanup using
that) appears to solve the problem.
-- Braden McDaniel e-mail: <braden_at_endoframe.com> <http://endoframe.com> Jabber: <braden@jabber.org>Received on 2007-01-02