summaryrefslogtreecommitdiff
path: root/ext/curl/interface.c
diff options
context:
space:
mode:
authorPierrick Charron <pierrick@php.net>2013-01-01 21:12:02 -0500
committerPierrick Charron <pierrick@php.net>2013-01-01 21:12:02 -0500
commit343a9199bbbf4f63b02099ceef27ef9881d8aa9f (patch)
treee133bf1fb897b49b946ec29bf77551603e037b39 /ext/curl/interface.c
parenta666285bc2488b7f7362368c388e41428610ad1d (diff)
downloadphp-git-343a9199bbbf4f63b02099ceef27ef9881d8aa9f.tar.gz
Remove passwd handler from struct when not needed
CURLOPT_PASSWDFUNCTION was removed in cURL 7.15.5, the passwd field will not be used for version greater than this one
Diffstat (limited to 'ext/curl/interface.c')
-rw-r--r--ext/curl/interface.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index 125094c53a..e0c95efed5 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -3267,9 +3267,11 @@ static void _php_curl_close_ex(php_curl *ch TSRMLS_DC)
if (ch->handlers->write_header->func_name) {
zval_ptr_dtor(&ch->handlers->write_header->func_name);
}
+#if CURLOPT_PASSWDFUNCTION != 0
if (ch->handlers->passwd) {
zval_ptr_dtor(&ch->handlers->passwd);
}
+#endif
if (ch->handlers->std_err) {
zval_ptr_dtor(&ch->handlers->std_err);
}