summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNuno Lopes <nlopess@php.net>2007-06-24 11:41:12 +0000
committerNuno Lopes <nlopess@php.net>2007-06-24 11:41:12 +0000
commit7f47814c4e7f573df27ed7bdd13da75deaa84dc1 (patch)
treefed5074ce84399c3512cb8bcfaec815c96736208
parent4d503a8807de9060f9a795c5035c89d04be8bfb8 (diff)
downloadphp-git-7f47814c4e7f573df27ed7bdd13da75deaa84dc1.tar.gz
fix memleak in sxe_prop_dim_read()
#found by coverity
-rw-r--r--ext/simplexml/simplexml.c6
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) {