diff options
author | Sterling Hughes <sterling@php.net> | 2001-07-10 20:09:56 +0000 |
---|---|---|
committer | Sterling Hughes <sterling@php.net> | 2001-07-10 20:09:56 +0000 |
commit | 5e4e376571e84d8234f65bcc116e16ccd72e5759 (patch) | |
tree | 80167c7cde327a76e29cd6dcb344a3cc9e89c332 | |
parent | fa684c5bd4876290a4bc75fefff91c09691bce0a (diff) | |
download | php-git-5e4e376571e84d8234f65bcc116e16ccd72e5759.tar.gz |
If the transfer fails, still free the buffer if it exists.
-rw-r--r-- | ext/curl/curl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/curl/curl.c b/ext/curl/curl.c index 13cffedf70..d6ffd354ff 100644 --- a/ext/curl/curl.c +++ b/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; } |