@@ -1188,7 +1188,7 @@ PHP_METHOD(SoapServer, handle)
1188
1188
soapServicePtr service ;
1189
1189
xmlDocPtr doc_request = NULL , doc_return = NULL ;
1190
1190
zval function_name , * params , * soap_obj , retval ;
1191
- char * fn_name , cont_len [30 ];
1191
+ char cont_len [30 ];
1192
1192
int num_params = 0 , size , i , call_status = 0 ;
1193
1193
xmlChar * buf ;
1194
1194
HashTable * function_table ;
@@ -1450,8 +1450,8 @@ PHP_METHOD(SoapServer, handle)
1450
1450
}
1451
1451
}
1452
1452
#endif
1453
- fn_name = estrndup ( Z_STRVAL ( h -> function_name ), Z_STRLEN (h -> function_name ));
1454
- if (zend_hash_str_exists (function_table , php_strtolower ( fn_name , Z_STRLEN ( h -> function_name )), Z_STRLEN ( h -> function_name ) ) ||
1453
+ zend_string * fn_name = zend_string_tolower ( Z_STR (h -> function_name ));
1454
+ if (zend_hash_exists (function_table , fn_name ) ||
1455
1455
((service -> type == SOAP_CLASS || service -> type == SOAP_OBJECT ) &&
1456
1456
zend_hash_str_exists (function_table , ZEND_CALL_FUNC_NAME , sizeof (ZEND_CALL_FUNC_NAME )- 1 ))) {
1457
1457
if (service -> type == SOAP_CLASS || service -> type == SOAP_OBJECT ) {
@@ -1472,25 +1472,25 @@ PHP_METHOD(SoapServer, handle)
1472
1472
}
1473
1473
php_output_discard ();
1474
1474
soap_server_fault_ex (function , & h -> retval , h );
1475
- efree (fn_name );
1475
+ zend_string_release (fn_name );
1476
1476
if (service -> type == SOAP_CLASS && soap_obj ) {zval_ptr_dtor (soap_obj );}
1477
1477
goto fail ;
1478
1478
} else if (EG (exception )) {
1479
1479
php_output_discard ();
1480
1480
_soap_server_exception (service , function , ZEND_THIS );
1481
- efree (fn_name );
1481
+ zend_string_release (fn_name );
1482
1482
if (service -> type == SOAP_CLASS && soap_obj ) {zval_ptr_dtor (soap_obj );}
1483
1483
goto fail ;
1484
1484
}
1485
1485
} else if (h -> mustUnderstand ) {
1486
1486
soap_server_fault ("MustUnderstand" ,"Header not understood" , NULL , NULL , NULL );
1487
1487
}
1488
- efree (fn_name );
1488
+ zend_string_release (fn_name );
1489
1489
}
1490
1490
}
1491
1491
1492
- fn_name = estrndup ( Z_STRVAL ( function_name ), Z_STRLEN (function_name ));
1493
- if (zend_hash_str_exists (function_table , php_strtolower ( fn_name , Z_STRLEN ( function_name )), Z_STRLEN ( function_name ) ) ||
1492
+ zend_string * fn_name = zend_string_tolower ( Z_STR (function_name ));
1493
+ if (zend_hash_exists (function_table , fn_name ) ||
1494
1494
((service -> type == SOAP_CLASS || service -> type == SOAP_OBJECT ) &&
1495
1495
zend_hash_str_exists (function_table , ZEND_CALL_FUNC_NAME , sizeof (ZEND_CALL_FUNC_NAME )- 1 ))) {
1496
1496
if (service -> type == SOAP_CLASS || service -> type == SOAP_OBJECT ) {
@@ -1512,7 +1512,7 @@ PHP_METHOD(SoapServer, handle)
1512
1512
} else {
1513
1513
php_error (E_ERROR , "Function '%s' doesn't exist" , Z_STRVAL (function_name ));
1514
1514
}
1515
- efree (fn_name );
1515
+ zend_string_release (fn_name );
1516
1516
1517
1517
if (EG (exception )) {
1518
1518
if (!zend_is_unwind_exit (EG (exception ))) {
0 commit comments