mirror of
https://github.com/php/php-src.git
synced 2024-11-29 04:46:07 +08:00
If the transfer fails, still free the buffer if it exists.
This commit is contained in:
parent
fa684c5bd4
commit
5e4e376571
@ -825,6 +825,8 @@ PHP_FUNCTION(curl_exec)
|
||||
|
||||
error = curl_easy_perform(ch->cp);
|
||||
if (error != CURLE_OK) {
|
||||
if (ch->handlers->write->buf)
|
||||
smart_str_free(&ch->handlers->write->buf);
|
||||
SAVE_CURL_ERROR(ch, error);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user