summaryrefslogtreecommitdiff
path: root/Zend/zend_ptr_stack.h
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2005-10-20 07:23:26 +0000
committerDmitry Stogov <dmitry@php.net>2005-10-20 07:23:26 +0000
commitc095e20ca8cc8fbe4d165f6411bb2235cf5f8dfc (patch)
tree3a0ae1fb75c31de29d918ef4cd4676f6c6e44d23 /Zend/zend_ptr_stack.h
parent9269f5847784091c1174b576da998cf55027f3cf (diff)
downloadphp-git-c095e20ca8cc8fbe4d165f6411bb2235cf5f8dfc.tar.gz
Fixed bug #31177 (menory leaks and corruption because of incorrect refcounting)
Diffstat (limited to 'Zend/zend_ptr_stack.h')
-rw-r--r--Zend/zend_ptr_stack.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/Zend/zend_ptr_stack.h b/Zend/zend_ptr_stack.h
index 1943603633..4e13f52374 100644
--- a/Zend/zend_ptr_stack.h
+++ b/Zend/zend_ptr_stack.h
@@ -84,7 +84,14 @@ static inline void zend_ptr_stack_3_pop(zend_ptr_stack *stack, void **a, void **
*a = *(--stack->top_element);
*b = *(--stack->top_element);
*c = *(--stack->top_element);
- stack->top -= 3;;
+ stack->top -= 3;
+}
+
+static inline void zend_ptr_stack_2_pop(zend_ptr_stack *stack, void **a, void **b)
+{
+ *a = *(--stack->top_element);
+ *b = *(--stack->top_element);
+ stack->top -= 2;
}
static inline void zend_ptr_stack_push(zend_ptr_stack *stack, void *ptr)