cURL / Mailing Lists / curl-library / Single Mail

curl-library

curl_easy_cleanup modifies the stack???

From: Braden McDaniel <braden_at_endoframe.com>
Date: Fri, 29 Dec 2006 01:29:40 -0500

Can someone explain to me what's going on here? This code

        fprintf(stderr, "msg->easy_handle = %lu\n", ptrdiff_t(msg->easy_handle));
        curl_easy_cleanup(msg->easy_handle);
        fprintf(stderr, "msg->easy_handle = %lu\n", ptrdiff_t(msg->easy_handle));

results in this output:

        msg->easy_handle = 10975264
        msg->easy_handle = 9801088

Now, I know the docs for curl_easy_cleanup say that the handle isn't
usable after calling the function. But even so, this outcome really
surprised me. I just didn't expect a C function to behave this way.

-- 
Braden McDaniel                           e-mail: <braden_at_endoframe.com>
<http://endoframe.com>                    Jabber: <braden@jabber.org>
Received on 2006-12-29