From 5b358603bd8897dcd38795c1ae971a8f917e97df Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 22 Oct 2007 15:05:35 +0000 Subject: Michal Marek forwarded the bug report https://bugzilla.novell.com/show_bug.cgi?id=332917 about a HTTP redirect to FTP that caused memory havoc. His work together with my efforts created two fixes: #1 - FTP::file was moved to struct ftp_conn, because is has to be dealt with at connection cleanup, at which time the struct HandleData could be used by another connection. Also, the unused char *urlpath member is removed from struct FTP. #2 - provide a Curl_reset_reqproto() function that frees data->reqdata.proto.* on connection setup if needed (that is if the SessionHandle was used by a different connection). --- lib/url.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/url.h') diff --git a/lib/url.h b/lib/url.h index d7a75e0a5..e4f72eb7a 100644 --- a/lib/url.h +++ b/lib/url.h @@ -84,4 +84,9 @@ CURLcode Curl_doing_fdset(struct connectdata *conn, int *max_fdp); #endif +/* Called on connect, and if there's already a protocol-specific struct + allocated for a different connection, this frees it that it can be setup + properly later on. */ +void Curl_reset_reqproto(struct connectdata *conn); + #endif -- cgit v1.2.3