diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-10-27 14:07:30 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-10-27 14:07:30 +0000 |
commit | 3a9cdbfd41397fc942a556be7079bc362e95b850 (patch) | |
tree | 743dc71063c5e517e9c15e5dc36b0e8526a9a4a2 /Zend | |
parent | bac9ab777e29abf101354f7f930a6b8ed763042f (diff) | |
download | php-git-3a9cdbfd41397fc942a556be7079bc362e95b850.tar.gz |
Fixed memory leak on error
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend_API.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 584d7a1ec3..2d0b8ea16c 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -1534,10 +1534,14 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr } } 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; |