Loading lib/ftp.c +9 −7 Original line number Diff line number Diff line Loading @@ -1720,12 +1720,14 @@ CURLcode Curl_ftp_disconnect(struct connectdata *conn) { struct FTP *ftp= conn->proto.ftp; /* The FTP session may or may not have been allocated/setup at this point! */ if(ftp) { if(ftp->user) free(ftp->user); if(ftp->passwd) free(ftp->passwd); if(ftp->entrypath) free(ftp->entrypath); } return CURLE_OK; } lib/transfer.c +1 −1 Original line number Diff line number Diff line Loading @@ -955,7 +955,7 @@ CURLcode Curl_perform(CURL *curl) } while(1); /* loop if Location: */ if(conn->newurl) { if((CURLE_OK == res) && conn->newurl) { free(conn->newurl); conn->newurl = NULL; } Loading lib/url.c +6 −1 Original line number Diff line number Diff line Loading @@ -816,6 +816,9 @@ CURLcode Curl_disconnect(struct connectdata *conn) free(conn->hostent_buf); #endif if(conn->newurl) free(conn->newurl); if(conn->path) /* the URL path part */ free(conn->path); Loading Loading @@ -2147,8 +2150,10 @@ CURLcode Curl_connect(struct UrlData *data, /* We're not allowed to return failure with memory left allocated in the connectdata struct, free those here */ conn = (struct connectdata *)*in_connect; if(conn) if(conn) { Curl_disconnect(conn); /* close the connection */ *in_connect = NULL; /* return a NULL */ } } return code; } Loading Loading
lib/ftp.c +9 −7 Original line number Diff line number Diff line Loading @@ -1720,12 +1720,14 @@ CURLcode Curl_ftp_disconnect(struct connectdata *conn) { struct FTP *ftp= conn->proto.ftp; /* The FTP session may or may not have been allocated/setup at this point! */ if(ftp) { if(ftp->user) free(ftp->user); if(ftp->passwd) free(ftp->passwd); if(ftp->entrypath) free(ftp->entrypath); } return CURLE_OK; }
lib/transfer.c +1 −1 Original line number Diff line number Diff line Loading @@ -955,7 +955,7 @@ CURLcode Curl_perform(CURL *curl) } while(1); /* loop if Location: */ if(conn->newurl) { if((CURLE_OK == res) && conn->newurl) { free(conn->newurl); conn->newurl = NULL; } Loading
lib/url.c +6 −1 Original line number Diff line number Diff line Loading @@ -816,6 +816,9 @@ CURLcode Curl_disconnect(struct connectdata *conn) free(conn->hostent_buf); #endif if(conn->newurl) free(conn->newurl); if(conn->path) /* the URL path part */ free(conn->path); Loading Loading @@ -2147,8 +2150,10 @@ CURLcode Curl_connect(struct UrlData *data, /* We're not allowed to return failure with memory left allocated in the connectdata struct, free those here */ conn = (struct connectdata *)*in_connect; if(conn) if(conn) { Curl_disconnect(conn); /* close the connection */ *in_connect = NULL; /* return a NULL */ } } return code; } Loading