mirror of
https://github.com/php/php-src.git
synced 2024-11-25 02:44:58 +08:00
Fix bug #61264: xmlrpc_parse_method_descriptions leaks temporary variable
This commit is contained in:
parent
e7810c1f1e
commit
9b9f05fd6e
1
NEWS
1
NEWS
@ -48,6 +48,7 @@ PHP NEWS
|
||||
|
||||
- XMLRPC:
|
||||
. Fixed bug #61097 (Memory leak in xmlrpc functions copying zvals). (Nikita Popov)
|
||||
. Fixed bug #61264 (xmlrpc_parse_method_descriptions leaks temporary variable). (Nikita Popov)
|
||||
|
||||
- Zlib:
|
||||
. Fixed bug #61139 (gzopen leaks when specifying invalid mode). (Nikita Popov)
|
||||
|
17
ext/xmlrpc/tests/bug61264.phpt
Normal file
17
ext/xmlrpc/tests/bug61264.phpt
Normal file
@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Bug #61264: xmlrpc_parse_method_descriptions leaks temporary variable
|
||||
--FILE--
|
||||
<?php
|
||||
$xml = <<<XML
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<a>
|
||||
<b>foo</b>
|
||||
</a>
|
||||
XML;
|
||||
var_dump(xmlrpc_parse_method_descriptions($xml));
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
["b"]=>
|
||||
string(3) "foo"
|
||||
}
|
@ -1240,8 +1240,7 @@ PHP_FUNCTION(xmlrpc_parse_method_descriptions)
|
||||
retval = XMLRPC_to_PHP(xVal);
|
||||
|
||||
if (retval) {
|
||||
*return_value = *retval;
|
||||
zval_copy_ctor(return_value);
|
||||
RETVAL_ZVAL(retval, 1, 1);
|
||||
}
|
||||
/* dust, sweep, and mop */
|
||||
XMLRPC_CleanupValue(xVal);
|
||||
|
Loading…
Reference in New Issue
Block a user