Browse Source

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

migration/EXPERIMENTAL
Sterling Hughes 25 years ago
parent
commit
5e4e376571
  1. 2
      ext/curl/curl.c

2
ext/curl/curl.c

@ -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…
Cancel
Save