From: Ilia Alshanetsky Date: Sun, 21 Sep 2003 20:21:39 +0000 (+0000) Subject: Added a note & fix for a memory leak in libtidy. X-Git-Tag: RELEASE_0_7~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d14df17390aea73aafe3e010fd26a92230dc7787;p=php Added a note & fix for a memory leak in libtidy. This will be removed once the libtidy developers release a patched version of their library (or we start bundling the patched version). --- diff --git a/ext/tidy/README b/ext/tidy/README index 9b15dcd102..08bb1a9536 100644 --- a/ext/tidy/README +++ b/ext/tidy/README @@ -7,6 +7,15 @@ Tidy is an extension based on Libtidy (http://tidy.sf.net/) and allows a PHP dev to clean, repair, and traverse HTML, XHTML, and XML documents -- including ones with embedded scripting languages such as PHP or ASP within them using OO constructs. +--------------------------------------------------------------------------------------- +!! Important Note !! +--------------------------------------------------------------------------------------- +At this time libtidy has a small memory leak inside the ParseConfigFileEnc() function +used to load configuration from a file. If you intend to use this functionality apply +the "libtidy.txt" patch (cd tidy/src/; patch -p0 < libtidy.txt) to libtidy sources and +then recompile libtidy. +--------------------------------------------------------------------------------------- + The Tidy extension has two separate APIs, one for general parsing, cleaning, and repairing and another for document traversal. The general API is provided below: diff --git a/ext/tidy/libtidy.txt b/ext/tidy/libtidy.txt new file mode 100644 index 0000000000..53185d9fc2 --- /dev/null +++ b/ext/tidy/libtidy.txt @@ -0,0 +1,12 @@ +--- config.c Mon Jun 9 04:07:55 2003 ++++ config.c Sun Sep 21 16:13:04 2003 +@@ -719,7 +719,8 @@ + } + + fclose( fin ); +- MemFree( cfg->cfgIn ); ++ MemFree( cfg->cfgIn->source.sourceData ); ++ MemFree( cfg->cfgIn ); + cfg->cfgIn = NULL; + } +