1
0
mirror of https://github.com/php/php-src.git synced 2026-03-31 04:32:19 +02:00

optionvalue is being copied via zval_copy_ctor, there's no need to addref the original

This commit is contained in:
Sara Golemon
2003-06-16 18:19:14 +00:00
parent cd5fd7eed7
commit 2f4e91bf8a
2 changed files with 0 additions and 2 deletions

View 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);

View File

@@ -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);