]> granicus.if.org Git - php/commitdiff
Added a note & fix for a memory leak in libtidy.
authorIlia Alshanetsky <iliaa@php.net>
Sun, 21 Sep 2003 20:21:39 +0000 (20:21 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sun, 21 Sep 2003 20:21:39 +0000 (20:21 +0000)
This will be removed once the libtidy developers release a patched version
of their library (or we start bundling the patched version).

ext/tidy/README
ext/tidy/libtidy.txt [new file with mode: 0644]

index 9b15dcd1022b048a2046ec7e18a8a883d6737347..08bb1a9536577316a3a14d2b9dce464e10c3dc03 100644 (file)
@@ -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 (file)
index 0000000..53185d9
--- /dev/null
@@ -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;
+     }