For Programmers: Free Programming Magazines  


Home > Archive > PHP Zend Engine > October 2005 > cvs: ZendEngine2(PHP_5_1) / zend_API.c









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cvs: ZendEngine2(PHP_5_1) / zend_API.c
Ilia Alshanetsky

2005-10-27, 6:56 pm

iliaa Thu Oct 27 10:07:31 2005 EDT

Modified files: (Branch: PHP_5_1)
/ZendEngine2 zend_API.c
Log:
Fixed memory leak on error


http://cvs.php.net/diff.php/ZendEng...=1.296.2.6&ty=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.296.2.5 ZendEngine2/zend_API.c:1.296.2.6
--- ZendEngine2/zend_API.c:1.296.2.5 Tue Oct 25 19:19:58 2005
+++ ZendEngine2/zend_API.c Thu Oct 27 10:07:30 2005
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/

-/* $Id: zend_API.c,v 1.296.2.5 2005/10/25 23:19:58 helly Exp $ */
+/* $Id: zend_API.c,v 1.296.2.6 2005/10/27 14:07:30 iliaa Exp $ */

#include "zend.h"
#include "zend_execute.h"
@@ -1534,10 +1534,14 @@
}
} else {
if (scope && (scope->ce_flags & ZEND_ACC_INTERFACE)) {
+ efree(lc_class_name);
zend_error(error_type, "Interface %s cannot contain non abstract method %s()", scope->name, ptr->fname);
return FAILURE;
}
if (!internal_function->handler) {
+ if (scope) {
+ efree(lc_class_name);
+ }
zend_error(error_type, "Method %s%s%s() cannot be a NULL function", scope ? scope->name : "", scope ? "::" : "", ptr->fname);
zend_unregister_functions(functions, count, target_function_table TSRMLS_CC);
return FAILURE;
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com