summaryrefslogtreecommitdiff
path: root/ext/standard/incomplete_class.c
diff options
context:
space:
mode:
authorMark A. Hershberger <mah@debian.(none)>2009-03-25 00:37:27 -0400
committerMark A. Hershberger <mah@debian.(none)>2009-03-25 00:37:27 -0400
commit2d4e5b09576bb4f0ba716cc82cdf29ea04d9184b (patch)
tree41ccc042009cba53e4ce43e727fcba4c1cfbf7f3 /ext/standard/incomplete_class.c
parentd29a4fd2dd3b5d4cf6e80b602544d7b71d794e76 (diff)
downloadphp-upstream/5.2.2.tar.gz
Imported Upstream version 5.2.2upstream/5.2.2
Diffstat (limited to 'ext/standard/incomplete_class.c')
-rw-r--r--ext/standard/incomplete_class.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/standard/incomplete_class.c b/ext/standard/incomplete_class.c
index 50511c01f..3f6d85bd1 100644
--- a/ext/standard/incomplete_class.c
+++ b/ext/standard/incomplete_class.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2006 The PHP Group |
+ | Copyright (c) 1997-2007 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
*/
-/* $Id: incomplete_class.c,v 1.28.2.2 2006/01/28 06:14:34 fmk Exp $ */
+/* $Id: incomplete_class.c,v 1.28.2.2.2.2 2007/02/01 14:07:43 tony2001 Exp $ */
#include "php.h"
#include "basic_functions.h"
@@ -39,14 +39,20 @@ static zend_object_handlers php_incomplete_object_handlers;
static void incomplete_class_message(zval *object, int error_type TSRMLS_DC)
{
char *class_name;
+ zend_bool class_name_alloced = 1;
class_name = php_lookup_class_name(object, NULL);
if (!class_name) {
+ class_name_alloced = 0;
class_name = "unknown";
}
php_error_docref(NULL TSRMLS_CC, error_type, INCOMPLETE_CLASS_MSG, class_name);
+
+ if (class_name_alloced) {
+ efree(class_name);
+ }
}
/* }}} */