cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: conn->proto.ftp == NULL in Curl_ftp_done

From: Armel Asselin <asselin.armel_at_wanadoo.fr>
Date: Fri, 15 Sep 2006 09:53:12 +0200

>> when I remove a easy handle from my multi, it seems to happen that:
>> conn->proto.ftp == NULL in Curl_ftp_done Curl_ftp_done crashes but the
>> remain of the code seems to cope with that perfectly.
>>
>> is it a big bug from my side? or should I add some test in Curl_ftp_done?
>
> I'm not sure I understand your use case nor what you say your added code
> would do.
technically i'm trying to go through an HTTP proxy in tunnel mode (btw, I
just realized that it wanted a login/password). It refuses all my
connections. After a certain number of re-trial (the easy handle is
reset/kept after each request), and at the Curl_multi_remove_handle time the
above error happens (the easy is not yet deleted, i checked).
but it is not easy to repeat, sometimes it happens, sometimes not.

> Can you add/provide a test case that repeats the problem? Or perhaps just
> show us a patch that fixes it for you?
near the start of
CURLcode Curl_ftp_done(struct connectdata *conn, CURLcode status)

add : if (ftp == NULL) return result;
before any use of 'ftp' variable.
Received on 2006-09-15