php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: felipensp at gmail dot com
New email:
PHP Version: OS:

 

 [2008-07-18 14:54 UTC] felipensp at gmail dot com
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 ===


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-18 17:35 UTC] felipe@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC