when using PORT, we now free the host name buffer properly
authorDaniel Stenberg <daniel@haxx.se>
Tue, 21 Nov 2000 15:34:40 +0000 (15:34 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 21 Nov 2000 15:34:40 +0000 (15:34 +0000)
lib/ftp.c

index 8b4c205..1326297 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -774,6 +774,9 @@ CURLcode _ftp(struct connectdata *conn)
         free(hostdataptr);
         return CURLE_FTP_PORT_FAILED;
       }
+      if(hostdataptr)
+        /* free the memory used for name lookup */
+        free(hostdataptr);
     }
     else {
       failf(data, "could't find my own IP address (%s)", myhost);