Fix yet another leak

This commit is contained in:
rfm 2025-02-06 20:11:08 +00:00
parent 87be17f41b
commit 48f01b610d

View file

@ -139,9 +139,8 @@ errorForCURLcode(CURL *handle, CURLcode code, char errorBuffer[CURL_ERROR_SIZE])
return NULL; return NULL;
} }
errorString = [[NSString alloc] initWithCString: errorBuffer]; errorString = [NSString stringWithCString: errorBuffer];
curlErrorString = curlErrorString = [NSString stringWithCString: curl_easy_strerror(code)];
[[NSString alloc] initWithCString: curl_easy_strerror(code)];
/* Get errno number from the last connect failure. /* Get errno number from the last connect failure.
* *
@ -267,9 +266,6 @@ errorForCURLcode(CURL *handle, CURLcode code, char errorBuffer[CURL_ERROR_SIZE])
code: urlError code: urlError
userInfo: userInfo]; userInfo: userInfo];
[curlErrorString release];
[errorString release];
return error; return error;
} /* errorForCURLcode */ } /* errorForCURLcode */
@ -1344,8 +1340,8 @@ write_callback(char *ptr, size_t size, size_t nmemb, void *userdata)
if (_properties & GSURLSessionUpdatesDelegate) if (_properties & GSURLSessionUpdatesDelegate)
{ {
if (_properties & GSURLSessionWritesDataToFile && if (_properties & GSURLSessionWritesDataToFile
[_delegate respondsToSelector: didFinishDownloadingToURLSel]) && [_delegate respondsToSelector: didFinishDownloadingToURLSel])
{ {
NSURL *url = [_taskData objectForKey: taskTemporaryFileLocationKey]; NSURL *url = [_taskData objectForKey: taskTemporaryFileLocationKey];