From 4e8817169c68b261ef61b12681feedf4727fa2f4 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 9 Feb 2015 11:44:12 +0100 Subject: [PATCH] fix leak --- php_http_client_curl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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; } -- 2.30.2