diff options
author | Nikita Popov <nikic@php.net> | 2016-02-11 16:22:42 +0100 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2016-02-11 16:25:16 +0100 |
commit | 1322672c0b70cf3a8f3fa64f7d6c4b52338f8b81 (patch) | |
tree | 6a5e9a7e0cca9e55e1b6d5df11ba8f9b31b106eb /Zend/zend_generators.c | |
parent | 95a47ab556a2014b6aad193dd881cc0f35f0e9c8 (diff) | |
download | php-git-1322672c0b70cf3a8f3fa64f7d6c4b52338f8b81.tar.gz |
Fix dangling send target when using yield from
Also drop some unnecessary TRY_DELREFs -- leftovers from the days
when null was refcounted.
Diffstat (limited to 'Zend/zend_generators.c')
-rw-r--r-- | Zend/zend_generators.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c index c572a9cc35..f8087fc943 100644 --- a/Zend/zend_generators.c +++ b/Zend/zend_generators.c @@ -35,11 +35,6 @@ static void zend_generator_cleanup_unfinished_execution(zend_generator *generato { zend_execute_data *execute_data = generator->execute_data; - if (generator->send_target) { - Z_TRY_DELREF_P(generator->send_target); - generator->send_target = NULL; - } - if (execute_data->opline != execute_data->func->op_array.opcodes) { /* -1 required because we want the last run opcode, not the next to-be-run one. */ uint32_t op_num = execute_data->opline - execute_data->func->op_array.opcodes - 1; @@ -882,7 +877,6 @@ ZEND_METHOD(Generator, send) root = zend_generator_get_current(generator); /* Put sent value in the target VAR slot, if it is used */ if (root->send_target) { - Z_TRY_DELREF_P(root->send_target); ZVAL_COPY(root->send_target, value); } |