aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-03-01 07:59:25 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-03-01 07:59:25 +0000
commit4dfc0a78e70cc77ba61de60df6815a889f4c6b4b (patch)
tree8afbd6f35810acca399322902ff22bef399b60d9
parent82bd583251251f59ada527f4d5197a021676685a (diff)
Only attempt to send the FTP QUIT command if we actually have a FTP struct.
-rw-r--r--lib/ftp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 0622e7edb..ffb5f0e89 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -2485,10 +2485,11 @@ CURLcode Curl_ftp_disconnect(struct connectdata *conn)
Curl_ftp_quit() will check the state of ftp->ctl_valid. If it's ok it
will try to send the QUIT command, otherwise it will just return.
*/
- (void)Curl_ftp_quit(conn); /* ignore errors on the QUIT */
/* The FTP session may or may not have been allocated/setup at this point! */
if(ftp) {
+ (void)Curl_ftp_quit(conn); /* ignore errors on the QUIT */
+
if(ftp->entrypath)
free(ftp->entrypath);
if(ftp->cache) {