2018-07-30 Fred Gleason <fredg@paravelsystems.com>

* Cleaned up memory leaks in 'RDAudioExport', 'RDAudioImport',
	'RDAudioStore', 'RDCart', 'RDCopyAudio', 'RDPeakExport',
	'RDRehash', and 'RDTrimAudio'.
	* Modified Xload operations in 'RDDelete', 'RDDownload' and
	'RDUpload' to work properly with credentials using UTF-8 strings.
This commit is contained in:
Fred Gleason
2018-07-30 11:02:55 -04:00
parent 0605d2ff83
commit 5482e87e23
14 changed files with 61 additions and 13 deletions

View File

@@ -108,6 +108,7 @@ RDCopyAudio::ErrorCode RDCopyAudio::runCopy(const QString &username,
(const char *)QString().sprintf("%u",conv_destination_cut_number),
CURLFORM_END);
if((curl=curl_easy_init())==NULL) {
curl_formfree(first);
return RDCopyAudio::ErrorInternal;
}
@@ -138,6 +139,7 @@ RDCopyAudio::ErrorCode RDCopyAudio::runCopy(const QString &username,
case CURLE_HTTP_POST_ERROR:
default:
curl_easy_cleanup(curl);
curl_formfree(first);
return RDCopyAudio::ErrorInternal;
case CURLE_URL_MALFORMAT:
@@ -145,10 +147,12 @@ RDCopyAudio::ErrorCode RDCopyAudio::runCopy(const QString &username,
case CURLE_COULDNT_CONNECT:
case 9: // CURLE_REMOTE_ACCESS_DENIED:
curl_easy_cleanup(curl);
curl_formfree(first);
return RDCopyAudio::ErrorUrlInvalid;
}
curl_easy_getinfo(curl,CURLINFO_RESPONSE_CODE,&response_code);
curl_easy_cleanup(curl);
curl_formfree(first);
switch(response_code) {
case 200: