summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSara Golemon <pollita@php.net>2003-06-16 18:19:14 +0000
committerSara Golemon <pollita@php.net>2003-06-16 18:19:14 +0000
commit2f4e91bf8a25ca7b47e7688281d432500eeae97f (patch)
tree49ee5c4f9cd68f344726ddf9e0ce5ad6b55be2c6
parentcd5fd7eed768c65d4721b882edbe3ee5dffa65c2 (diff)
downloadphp-git-2f4e91bf8a25ca7b47e7688281d432500eeae97f.tar.gz
optionvalue is being copied via zval_copy_ctor, there's no need to addref the original
-rw-r--r--ext/standard/streamsfuncs.c1
-rwxr-xr-xmain/streams/streams.c1
2 files changed, 0 insertions, 2 deletions
diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c
index 8a2c01cc35..aa729cc53f 100644
--- a/ext/standard/streamsfuncs.c
+++ b/ext/standard/streamsfuncs.c
@@ -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);
diff --git a/main/streams/streams.c b/main/streams/streams.c
index f35b401b0d..15483d9d64 100755
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -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);