cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: invalid free after an http redirect to ftp

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 24 Oct 2007 09:48:58 +0200 (CEST)

On Tue, 23 Oct 2007, Dan Fandrich wrote:

> I found a related issue to this when performing a HTTP request followed by a
> FTP request followed by a FILE request. The ftp connection is not closed so
> no QUIT is sent, and ftpc->prevpath and ftpc->entrypath are not freed
> resulting in a memory leak. I suspect Curl_ftp_disconnect should be called
> (through the handler struct) when the protocol changes.

Not really, the connection should be left in the connection cache for possible
later re-use and when the easy handle is killed it should close all
connections in the cache.

> I'm hesistant to check in the test because of the code freeze (some trivial
> changes to the FTP server are required).

I think this sounds like a problem that we should try to fix first, rather
than to hurry for a release with these known bugs present.

> A whole raft of these multiple protocols on one handle test could be created
> (and probably should) since this is an area that several bugs have crept in
> recently.

Yeah, quite apparently.

> Is it worthwhile creating a new numeric section for these?

Sure, why not? Numerical sections are cheap and might help us to keep things
somewhat more sorted!

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-10-24