mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fix bug #61097 Memory leak in xmlrpc functions copying zvals
Needs to be merged to 5.4.
This commit is contained in:
parent
032bbc3164
commit
957029f44a
2 changed files with 20 additions and 6 deletions
|
@ -1043,9 +1043,8 @@ PHP_FUNCTION(xmlrpc_server_register_method)
|
|||
*/
|
||||
if (XMLRPC_ServerRegisterMethod(server->server_ptr, method_key, php_xmlrpc_callback)) {
|
||||
/* save for later use */
|
||||
MAKE_STD_ZVAL(method_name_save);
|
||||
*method_name_save = **method_name;
|
||||
zval_copy_ctor(method_name_save);
|
||||
ALLOC_ZVAL(method_name_save);
|
||||
MAKE_COPY_ZVAL(method_name, method_name_save);
|
||||
|
||||
/* register our php method */
|
||||
add_zval(server->method_map, method_key, &method_name_save);
|
||||
|
@ -1073,9 +1072,8 @@ PHP_FUNCTION(xmlrpc_server_register_introspection_callback)
|
|||
|
||||
if (type == le_xmlrpc_server) {
|
||||
/* save for later use */
|
||||
MAKE_STD_ZVAL(method_name_save);
|
||||
*method_name_save = **method_name;
|
||||
zval_copy_ctor(method_name_save);
|
||||
ALLOC_ZVAL(method_name_save);
|
||||
MAKE_COPY_ZVAL(method_name, method_name_save);
|
||||
|
||||
/* register our php method */
|
||||
add_zval(server->introspection_map, NULL, &method_name_save);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue