php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #61046
Patch bug61046.patch revision 2012-12-20 15:07 UTC by laruence@php.net

Patch bug61046.patch for Reproducible crash Bug #61046

Patch version 2012-12-20 15:07 UTC

Return to Bug #61046 | Download this patch
Patch Revisions:

Developer: laruence@php.net

diff --git a/Zend/zend.h b/Zend/zend.h
index 3226f8c..d4b6a42 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -757,11 +757,11 @@ END_EXTERN_C()
 	do {										\
 		if (Z_REFCOUNT_PP((ppzv)) > 1) {		\
 			zval *new_zv;						\
-			Z_DELREF_PP(ppzv);					\
 			ALLOC_ZVAL(new_zv);					\
 			INIT_PZVAL_COPY(new_zv, *(ppzv));	\
-			*(ppzv) = new_zv;					\
 			zval_copy_ctor(new_zv);				\
+			Z_DELREF_PP(ppzv);					\
+			*(ppzv) = new_zv;					\
 		}										\
 	} while (0)
 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 19:01:28 2024 UTC