@@ -2150,8 +2150,6 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
2150
2150
zend_function * ctor = NULL , * dtor = NULL , * clone = NULL , * __get = NULL , * __set = NULL , * __unset = NULL , * __isset = NULL , * __call = NULL , * __callstatic = NULL , * __tostring = NULL , * __debugInfo = NULL , * __serialize = NULL , * __unserialize = NULL ;
2151
2151
zend_string * lowercase_name ;
2152
2152
size_t fname_len ;
2153
- const char * lc_class_name = NULL ;
2154
- size_t class_name_len = 0 ;
2155
2153
2156
2154
if (type == MODULE_PERSISTENT ) {
2157
2155
error_type = E_CORE_WARNING ;
@@ -2166,17 +2164,6 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
2166
2164
internal_function -> module = EG (current_module );
2167
2165
memset (internal_function -> reserved , 0 , ZEND_MAX_RESERVED_RESOURCES * sizeof (void * ));
2168
2166
2169
- if (scope ) {
2170
- class_name_len = ZSTR_LEN (scope -> name );
2171
- if ((lc_class_name = zend_memrchr (ZSTR_VAL (scope -> name ), '\\' , class_name_len ))) {
2172
- ++ lc_class_name ;
2173
- class_name_len -= (lc_class_name - ZSTR_VAL (scope -> name ));
2174
- lc_class_name = zend_str_tolower_dup (lc_class_name , class_name_len );
2175
- } else {
2176
- lc_class_name = zend_str_tolower_dup (ZSTR_VAL (scope -> name ), class_name_len );
2177
- }
2178
- }
2179
-
2180
2167
while (ptr -> fname ) {
2181
2168
fname_len = strlen (ptr -> fname );
2182
2169
internal_function -> handler = ptr -> handler ;
@@ -2250,14 +2237,10 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
2250
2237
}
2251
2238
} else {
2252
2239
if (scope && (scope -> ce_flags & ZEND_ACC_INTERFACE )) {
2253
- efree ((char * )lc_class_name );
2254
2240
zend_error (error_type , "Interface %s cannot contain non abstract method %s()" , ZSTR_VAL (scope -> name ), ptr -> fname );
2255
2241
return FAILURE ;
2256
2242
}
2257
2243
if (!internal_function -> handler ) {
2258
- if (scope ) {
2259
- efree ((char * )lc_class_name );
2260
- }
2261
2244
zend_error (error_type , "Method %s%s%s() cannot be a NULL function" , scope ? ZSTR_VAL (scope -> name ) : "" , scope ? "::" : "" , ptr -> fname );
2262
2245
zend_unregister_functions (functions , count , target_function_table );
2263
2246
return FAILURE ;
@@ -2359,9 +2342,6 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
2359
2342
zend_string_release (lowercase_name );
2360
2343
}
2361
2344
if (unload ) { /* before unloading, display all remaining bad function in the module */
2362
- if (scope ) {
2363
- efree ((char * )lc_class_name );
2364
- }
2365
2345
while (ptr -> fname ) {
2366
2346
fname_len = strlen (ptr -> fname );
2367
2347
lowercase_name = zend_string_alloc (fname_len , 0 );
@@ -2389,7 +2369,6 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
2389
2369
scope -> __debugInfo = __debugInfo ;
2390
2370
scope -> __serialize = __serialize ;
2391
2371
scope -> __unserialize = __unserialize ;
2392
- efree ((char * )lc_class_name );
2393
2372
}
2394
2373
return SUCCESS ;
2395
2374
}
0 commit comments