free the FTP struct already in the _done() function
diff --git a/lib/ftp.c b/lib/ftp.c
index 920185e..ea984a6 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -588,7 +588,8 @@
   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;
 }