#33523 [Opn->Csd]: Memory leak in xmlrpc_encode_request() when encoding output option specified
| From: | iliaa@php.net | Date: | Thu, 30 Jun 2005 22:30:13 +0000 |
| Subject: | #33523 [Opn->Csd]: Memory leak in xmlrpc_encode_request() when encoding output option specified | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-81246@lists.php.net to get a copy of this message | ||
ID: 33523
Updated by: iliaa@php.net
Reported By: squasar at eternalviper dot net
-Status: Open
+Status: Closed
Bug Type: XMLRPC-EPI related
Operating System: Mac OS X 10.4.1/Darwin 8.1.0
PHP Version: 5.1.0b2
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2005-06-30 15:31:07] squasar at eternalviper dot net
Description:
------------
Calling xmlrpc_encode_request() with 'encoding' specified in
output_options causes a memory leak in xmlrpc-epi-php.c on
line 381, regardless of the encoding specified. It looks as if
a call to estrdup() does not have a matching efree().
'./configure' '--prefix=/usr' '--with-apxs' '--enable-cli'
'--
disable-short-tags' '--with-zlib' '--with-bz2' '--enable-ftp'
'--with-iconv' '--enable-mbstring' '--with-mysql=/usr' '--
enable-sockets' '--enable-debug' '--enable-simplexml' '--with-
xsl=/usr' '--with-curl=/usr' '--with-curlwrappers' '--enable-
bcmath' '--with-gmp=/usr/local' '--with-gd' '--with-freetype-
dir=/usr/X11R6' '--enable-gd-native-ttf' '--with-imap=/usr/
local/imap' '--with-imap-ssl=/usr' '--with-xmlrpc' '--with-
xml-dir=/usr' '--with-expat-dir=/usr' '--with-iconv-dir=/usr'
Reproduce code:
---------------
<?php
$ignore_me = xmlrpc_encode_request( 'any_method_name', array(), array(
'encoding' => 'utf-8' ) );
?>
Expected result:
----------------
No output at all.
Actual result:
--------------
Zend's memory debugger shows:
/Users/gwynne/src/php-src/ext/xmlrpc/xmlrpc-epi-php.c(381) :
Freeing 0x01BBB368 (6 bytes), script=-
=== Total 1 memory leaks detected ===
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33523&edit=1