diff --git a/lib/ftp.c b/lib/ftp.c index 920185e7e7e0a95aa01870c7d72114e3372702cf..ea984a6c75d8bf91e2c076b5a38255a1365621a0 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -588,7 +588,8 @@ CURLcode ftp_done(struct connectdata *conn) if(ftp->dir) free(ftp->dir); - /* TBD: the ftp struct is still allocated here */ + free(ftp); + data->proto.ftp=NULL; /* it is gone */ return CURLE_OK; }