From: Michael Wallner Date: Mon, 9 Feb 2015 10:44:12 +0000 (+0100) Subject: fix leak X-Git-Tag: RELEASE_3_0_0_RC1~58 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=4e8817169c68b261ef61b12681feedf4727fa2f4;p=m6w6%2Fext-http fix leak --- diff --git a/php_http_client_curl.c b/php_http_client_curl.c index 69d01a7..c507799 100644 --- a/php_http_client_curl.c +++ b/php_http_client_curl.c @@ -1506,9 +1506,11 @@ static zval *php_http_curle_get_option(php_http_option_t *opt, HashTable *option zval *option; if ((option = php_http_option_get(opt, options, NULL))) { - Z_TRY_ADDREF_P(option); - convert_to_explicit_type_ex(option, opt->type); - zend_hash_update(&curl->options.cache, opt->name, option); + zval zopt; + + ZVAL_DUP(&zopt, option); + convert_to_explicit_type(option, opt->type); + zend_hash_update(&curl->options.cache, opt->name, &zopt); } return option; }