iliaa           Mon Sep 18 03:29:21 2006 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/main       main.c 
  Log:
  Fixed memory leak on require() error
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.13&r2=1.640.2.23.2.14&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.13 php-src/main/main.c:1.640.2.23.2.14
--- php-src/main/main.c:1.640.2.23.2.13 Thu Aug 17 13:43:08 2006
+++ php-src/main/main.c Mon Sep 18 03:29:21 2006
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.13 2006/08/17 13:43:08 iliaa Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.14 2006/09/18 03:29:21 iliaa Exp $ */
 
 /* {{{ includes
  */
@@ -571,8 +571,6 @@
        if (docref_buf) {
                efree(docref_buf);
        }
-       php_error(type, "%s", message);
-       efree(message);
 
        if (PG(track_errors) && module_initialized && EG(active_symbol_table)) {
                zval *tmp;
@@ -581,6 +579,9 @@
                zend_hash_update(EG(active_symbol_table), "php_errormsg", 
sizeof("php_errormsg"), (void **) &tmp, sizeof(zval *), NULL);
        }
        efree(buffer);
+
+       php_error(type, "%s", message);
+       efree(message);
 }
 /* }}} */
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to