]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
free the FTP struct already in the _done() function
authorDaniel Stenberg <daniel@haxx.se>
Wed, 11 Oct 2000 10:57:52 +0000 (10:57 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 11 Oct 2000 10:57:52 +0000 (10:57 +0000)
lib/ftp.c

index 920185e7e7e0a95aa01870c7d72114e3372702cf..ea984a6c75d8bf91e2c076b5a38255a1365621a0 100644 (file)
--- 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;
 }