From: Pierre Joye Date: Wed, 19 Jan 2011 17:06:50 +0000 (+0000) Subject: - avoid local redeclaration X-Git-Tag: php-5.4.0alpha1~191^2~349 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3584bbee3b79ea6bb982d3bd1cde85fe239accdb;p=php - avoid local redeclaration --- diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 07f83914cd..628ef7ae34 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -6540,13 +6540,13 @@ void zend_do_use(znode *ns_name, znode *new_name, int is_global TSRMLS_DC) /* {{ c_ns_name[Z_STRLEN_P(CG(current_namespace))] = '\\'; memcpy(c_ns_name+Z_STRLEN_P(CG(current_namespace))+1, lcname, Z_STRLEN_P(name)+1); if (zend_hash_exists(CG(class_table), c_ns_name, Z_STRLEN_P(CG(current_namespace)) + 1 + Z_STRLEN_P(name)+1)) { - char *tmp = zend_str_tolower_dup(Z_STRVAL_P(ns), Z_STRLEN_P(ns)); + char *tmp2 = zend_str_tolower_dup(Z_STRVAL_P(ns), Z_STRLEN_P(ns)); if (Z_STRLEN_P(ns) != Z_STRLEN_P(CG(current_namespace)) + 1 + Z_STRLEN_P(name) || - memcmp(tmp, c_ns_name, Z_STRLEN_P(ns))) { + memcmp(tmp2, c_ns_name, Z_STRLEN_P(ns))) { zend_error(E_COMPILE_ERROR, "Cannot use %s as %s because the name is already in use", Z_STRVAL_P(ns), Z_STRVAL_P(name)); } - efree(tmp); + efree(tmp2); } efree(c_ns_name); } else if (zend_hash_find(CG(class_table), lcname, Z_STRLEN_P(name)+1, (void**)&pce) == SUCCESS &&