cvs: ZendEngine2(PHP_5_3) / zend_vm_def.h zend_vm_execute.h

[email protected] ("Dmitry Stogov")
Newsgroups php.zend-engine.cvs
Message-ID <cvsdmitry1210093181@cvsserver>
dmitry		Tue May  6 16:59:41 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /ZendEngine2	zend_vm_def.h zend_vm_execute.h 
  Log:
  Fixed possible memory leak
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_def.h?r1=1.59.2.29.2.48.2.52&r2=1.59.2.29.2.48.2.53&diff_format=u
Index: ZendEngine2/zend_vm_def.h
diff -u ZendEngine2/zend_vm_def.h:1.59.2.29.2.48.2.52 ZendEngine2/zend_vm_def.h:1.59.2.29.2.48.2.53
--- ZendEngine2/zend_vm_def.h:1.59.2.29.2.48.2.52	Mon May  5 11:03:32 2008
+++ ZendEngine2/zend_vm_def.h	Tue May  6 16:59:37 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_vm_def.h,v 1.59.2.29.2.48.2.52 2008/05/05 11:03:32 dmitry Exp $ */
+/* $Id: zend_vm_def.h,v 1.59.2.29.2.48.2.53 2008/05/06 16:59:37 dmitry Exp $ */
 
 /* If you change this file, please regenerate the zend_vm_execute.h and
  * zend_vm_opcodes.h files by running:
@@ -2568,7 +2568,7 @@
 	zend_uint arg_num = Z_LVAL(opline->op1.u.constant);
 	zend_free_op free_res;
 	zval **param = zend_vm_stack_get_arg(arg_num TSRMLS_CC);
-	zval **var_ptr = get_zval_ptr_ptr(&opline->result, EX(Ts), &free_res, BP_VAR_W);;
+	zval **var_ptr;
 
 	if (param == NULL) {
 		ALLOC_ZVAL(assignment_value);
@@ -2586,6 +2586,7 @@
 	}
 
 	zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, assignment_value, opline->extended_value TSRMLS_CC);
+	var_ptr = get_zval_ptr_ptr(&opline->result, EX(Ts), &free_res, BP_VAR_W);
 	Z_DELREF_PP(var_ptr);
 	*var_ptr = assignment_value;
 
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_execute.h?r1=1.62.2.30.2.49.2.52&r2=1.62.2.30.2.49.2.53&diff_format=u
Index: ZendEngine2/zend_vm_execute.h
diff -u ZendEngine2/zend_vm_execute.h:1.62.2.30.2.49.2.52 ZendEngine2/zend_vm_execute.h:1.62.2.30.2.49.2.53
--- ZendEngine2/zend_vm_execute.h:1.62.2.30.2.49.2.52	Tue May  6 09:41:39 2008
+++ ZendEngine2/zend_vm_execute.h	Tue May  6 16:59:38 2008
@@ -667,7 +667,7 @@
 	zend_uint arg_num = Z_LVAL(opline->op1.u.constant);
 	zend_free_op free_res;
 	zval **param = zend_vm_stack_get_arg(arg_num TSRMLS_CC);
-	zval **var_ptr = get_zval_ptr_ptr(&opline->result, EX(Ts), &free_res, BP_VAR_W);;
+	zval **var_ptr;
 
 	if (param == NULL) {
 		ALLOC_ZVAL(assignment_value);
@@ -685,6 +685,7 @@
 	}
 
 	zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, assignment_value, opline->extended_value TSRMLS_CC);
+	var_ptr = get_zval_ptr_ptr(&opline->result, EX(Ts), &free_res, BP_VAR_W);
 	Z_DELREF_PP(var_ptr);
 	*var_ptr = assignment_value;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.