summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-06-26 17:31:07 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-06-26 17:31:07 +0000
commit498595a122afc86977288bb1fe9edf093e10aaf6 (patch)
tree319a33f2e8b20fd1d3b5bc4725a0ec541089fdfd /ext
parentdc79ac371be3ab9e51bfb247d84199155e75d143 (diff)
downloadphp-git-498595a122afc86977288bb1fe9edf093e10aaf6.tar.gz
Fixed bug #33475 (cURL handle is not closed on curl_close().
Diffstat (limited to 'ext')
-rw-r--r--ext/curl/interface.c3
-rw-r--r--ext/curl/multi.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index 3e76531a90..440f4e3c4f 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -1291,12 +1291,13 @@ PHP_FUNCTION(curl_exec)
ch->uses++;
if (ch->handlers->write->method == PHP_CURL_RETURN && ch->handlers->write->buf.len > 0) {
+ --ch->uses;
if (ch->handlers->write->type != PHP_CURL_BINARY) {
smart_str_0(&ch->handlers->write->buf);
}
RETURN_STRINGL(ch->handlers->write->buf.c, ch->handlers->write->buf.len, 0);
}
-
+ --ch->uses;
RETURN_TRUE;
}
/* }}} */
diff --git a/ext/curl/multi.c b/ext/curl/multi.c
index b57907d15e..8f0345ff34 100644
--- a/ext/curl/multi.c
+++ b/ext/curl/multi.c
@@ -112,6 +112,8 @@ PHP_FUNCTION(curl_multi_remove_handle)
ZEND_FETCH_RESOURCE(ch, php_curl *, &z_ch, -1, le_curl_name, le_curl);
zval_ptr_dtor(&z_ch);
+
+ --ch->uses;
RETURN_LONG((long) curl_multi_remove_handle(mh->multi, ch->cp));
}