Skip to content

Commit 8a6f905

Browse files
committed
Merge branch 'PHP-7.0'
2 parents 4d7dd7a + 2453a48 commit 8a6f905

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/curl/interface.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,6 +2019,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
20192019
CURLcode error = CURLE_OK;
20202020
zend_long lval;
20212021

2022+
ZVAL_DEREF(zvalue);
20222023
switch (option) {
20232024
/* Long options */
20242025
case CURLOPT_SSL_VERIFYHOST:
@@ -2464,6 +2465,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
24642465
}
24652466

24662467
ZEND_HASH_FOREACH_VAL(ph, current) {
2468+
ZVAL_DEREF(current);
24672469
val = zval_get_string(current);
24682470
slist = curl_slist_append(slist, ZSTR_VAL(val));
24692471
zend_string_release(val);
@@ -2531,6 +2533,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
25312533
zend_string_addref(string_key);
25322534
}
25332535

2536+
ZVAL_DEREF(current);
25342537
if (Z_TYPE_P(current) == IS_OBJECT &&
25352538
instanceof_function(Z_OBJCE_P(current), curl_CURLFile_class)) {
25362539
/* new-style file upload */

0 commit comments

Comments
 (0)