From:             squasar at eternalviper dot net
Operating system: Mac OS X 10.4.1/Darwin 8.1.0
PHP version:      5.1.0b2
PHP Bug Type:     XMLRPC-EPI related
Bug description:  Memory leak in xmlrpc_encode_request() when encoding output 
option specified

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 bug report at http://bugs.php.net/?id=33523&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=33523&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=33523&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=33523&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=33523&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=33523&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=33523&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=33523&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=33523&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=33523&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=33523&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=33523&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=33523&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=33523&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=33523&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=33523&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=33523&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=33523&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=33523&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=33523&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=33523&r=mysqlcfg

Reply via email to