From: felipensp at gmail dot com Operating system: PHP version: 5.2CVS-2008-07-18 (CVS) PHP Bug Type: XMLRPC-EPI related Bug description: Return value from callback isn't freed
Description: ------------ The return value from callback in xmlrpc_server_register_introspection_callback() isn't freed. Memory leak found using --enable-debug. Reproduce code: --------------- <?php $options = array (); $request = xmlrpc_encode_request ("system.describeMethods", $options); $server = xmlrpc_server_create(); function foo() { } xmlrpc_server_register_introspection_callback ($server, 'foo'); $options = array ('output_type' => 'xml', 'version' => 'xmlrpc'); xmlrpc_server_call_method ($server, $request, NULL, $options); Expected result: ---------------- No mem. leak. Actual result: -------------- [Fri Jul 18 11:48:38 2008] Script: '/home/felipe/public_html/bug.php' /home/felipe/php5_2/ext/xmlrpc/xmlrpc-epi-php.c(885) : Freeing 0x085DC198 (16 bytes), script=/home/felipe/public_html/bug.php [Fri Jul 18 11:48:38 2008] Script: '/home/felipe/public_html/bug.php' /home/felipe/php5_2/Zend/zend_operators.c(543) : Freeing 0x085DC1D8 (1 bytes), script=/home/felipe/public_html/bug.php === Total 2 memory leaks detected === -- Edit bug report at http://bugs.php.net/?id=45556&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45556&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45556&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45556&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45556&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45556&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45556&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45556&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45556&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45556&r=support Expected behavior: http://bugs.php.net/fix.php?id=45556&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45556&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45556&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45556&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45556&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45556&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45556&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45556&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45556&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45556&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45556&r=mysqlcfg