|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-06-08 10:49 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 20:00:01 2025 UTC |
Description: ------------ The following code reports 2 memleaks: /opt/cvs/php5/ext/tidy/tidy.c(364) : Freeing 0x00415C70 (16 bytes), script=/usr/local/bxphp/apache/htdocs/tidy.php /opt/cvs/php5/ext/tidy/tidy.c(357) : Freeing 0x00415C20 (16 bytes), script=/usr/local/bxphp/apache/htdocs/tidy.php === Total 2 memory leaks detected === First one for the array_merge code (if I remove the array_merge, the memleak disappears) The second one for the 3rd param as an element of the 2nd param array. If I just add the value "utf8" there, it doesn't memleak. Don't question the code, it's just a stripdown of a more complex one ;) Reproduce code: --------------- $html = "foo"; $options = array("char-encoding" => "utf8","drop-proprietary-attributes" => "yes"); $options2 = array("drop-proprietary-attributes" => "no"); $options = array_merge($options,$options2); $tidy = new tidy(); $tidy->parseString($html,$options,$options['char-encoding']); print $tidy;