diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-05-15 12:29:52 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-05-15 12:29:52 +0400 |
commit | 3d2b1753393b78c37755a54be113d9201ad5359d (patch) | |
tree | 082da2a574ae86dea8ca531686940c6f21f9f93a | |
parent | 540070a999094bff64123bff365688699d6e5a18 (diff) | |
download | php-git-3d2b1753393b78c37755a54be113d9201ad5359d.tar.gz |
Fixed destructive assignment
-rw-r--r-- | ext/soap/php_packet_soap.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/soap/php_packet_soap.c b/ext/soap/php_packet_soap.c index ce505b4333..07bda29e5d 100644 --- a/ext/soap/php_packet_soap.c +++ b/ext/soap/php_packet_soap.c @@ -380,9 +380,13 @@ int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunction zend_hash_internal_pointer_reset(Z_ARRVAL_P(return_value)); tmp = zend_hash_get_current_data(Z_ARRVAL_P(return_value)); - if (Z_REFCOUNTED_P(tmp)) Z_ADDREF_P(tmp); - zval_dtor(return_value); - ZVAL_COPY_VALUE(return_value, tmp); + if (!Z_REFCOUNTED_P(return_value)) { + ZVAL_COPY_VALUE(return_value, tmp); + } else { + zend_refcounted *garbage = Z_COUNTED_P(return_value); + ZVAL_COPY(return_value, tmp); + _zval_dtor_func(garbage ZEND_FILE_LINE_CC); + } } } |