diff options
| author | Nuno Lopes <nlopess@php.net> | 2007-06-24 11:41:12 +0000 |
|---|---|---|
| committer | Nuno Lopes <nlopess@php.net> | 2007-06-24 11:41:12 +0000 |
| commit | 7f47814c4e7f573df27ed7bdd13da75deaa84dc1 (patch) | |
| tree | fed5074ce84399c3512cb8bcfaec815c96736208 | |
| parent | 4d503a8807de9060f9a795c5035c89d04be8bfb8 (diff) | |
| download | php-git-7f47814c4e7f573df27ed7bdd13da75deaa84dc1.tar.gz | |
fix memleak in sxe_prop_dim_read()
#found by coverity
| -rw-r--r-- | ext/simplexml/simplexml.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 9000ac5892..a62151d884 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -271,9 +271,6 @@ static zval * sxe_prop_dim_read(zval *object, zval *member, zend_bool elements, name = Z_STRVAL_P(member); } - MAKE_STD_ZVAL(return_value); - ZVAL_NULL(return_value); - GET_NODE(sxe, node); if (sxe->iter.type == SXE_ITER_ATTRLIST) { @@ -294,6 +291,9 @@ static zval * sxe_prop_dim_read(zval *object, zval *member, zend_bool elements, } } + MAKE_STD_ZVAL(return_value); + ZVAL_NULL(return_value); + if (node) { if (attribs) { if (Z_TYPE_P(member) != IS_LONG || sxe->iter.type == SXE_ITER_ATTRLIST) { |
