|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45556 Return value from callback isn't freed
Submitted: 2008-07-18 14:54 UTC Modified: 2008-07-18 17:35 UTC
From: felipensp at gmail dot com Assigned: felipe (profile)
Status: Closed Package: XMLRPC-EPI related
PHP Version: 5.2CVS-2008-07-18 (CVS) OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: felipensp at gmail dot com
New email:
PHP Version: OS:


 [2008-07-18 14:54 UTC] felipensp at gmail dot com
The return value from callback in xmlrpc_server_register_introspection_callback() isn't freed.

Memory leak found using --enable-debug.

Reproduce code:

$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 ===


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-18 17:35 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Apr 11 08:01:23 2021 UTC