If the transfer fails, still free the buffer if it exists.

This commit is contained in:
Sterling Hughes 2001-07-10 20:09:56 +00:00
parent fa684c5bd4
commit 5e4e376571

View File

@ -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;
}