]> granicus.if.org Git - php/commitdiff
optionvalue is being copied via zval_copy_ctor, there's no need to addref the original
authorSara Golemon <pollita@php.net>
Mon, 16 Jun 2003 18:19:14 +0000 (18:19 +0000)
committerSara Golemon <pollita@php.net>
Mon, 16 Jun 2003 18:19:14 +0000 (18:19 +0000)
ext/standard/streamsfuncs.c
main/streams/streams.c

index 8a2c01cc351a176d270d37d7ce4b01fb0be66661..aa729cc53fa4e9927ba444b5f29c9c36f85b0cd2 100644 (file)
@@ -650,7 +650,6 @@ static int parse_context_options(php_stream_context *context, zval *options)
                        while (SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_PP(wval), (void**)&oval, &opos)) {
 
                                if (HASH_KEY_IS_STRING == zend_hash_get_current_key_ex(Z_ARRVAL_PP(wval), &okey, &okey_len, NULL, 0, &opos)) {
-                                       ZVAL_ADDREF(*oval);
                                        php_stream_context_set_option(context, wkey, okey, *oval);
                                }
                                zend_hash_move_forward_ex(Z_ARRVAL_PP(wval), &opos);
index f35b401b0d21bd1c212c019d7315cea665d8d3db..15483d9d64c8281c34414cf84a384a19bed148fc 100755 (executable)
@@ -1676,7 +1676,6 @@ PHPAPI int php_stream_context_set_option(php_stream_context *context,
                        return FAILURE;
                }
 
-               ZVAL_ADDREF(optionvalue);
                wrapperhash = &category;
        }
        return zend_hash_update(Z_ARRVAL_PP(wrapperhash), (char*)optionname, strlen(optionname)+1, (void**)&copied_val, sizeof(zval *), NULL);