mirror of
https://github.com/moparisthebest/curl
synced 2024-10-31 15:45:12 -04:00
Only attempt to send the FTP QUIT command if we actually have a FTP struct.
This commit is contained in:
parent
82bd583251
commit
4dfc0a78e7
@ -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
|
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.
|
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! */
|
/* The FTP session may or may not have been allocated/setup at this point! */
|
||||||
if(ftp) {
|
if(ftp) {
|
||||||
|
(void)Curl_ftp_quit(conn); /* ignore errors on the QUIT */
|
||||||
|
|
||||||
if(ftp->entrypath)
|
if(ftp->entrypath)
|
||||||
free(ftp->entrypath);
|
free(ftp->entrypath);
|
||||||
if(ftp->cache) {
|
if(ftp->cache) {
|
||||||
|
Loading…
Reference in New Issue
Block a user