Memory leak

Hi,

I'm using Tidy to parse an HTML file and to build my own tree from the Tidy
tree.
When I run tidy in a loop on the same file ( this file is attaced to this
Email ) all night without writing back to the file ( this mean it was the
same HTML file every time ) I noticed a memory leak.
When I looked into the code of the Tidy, I found out that althogu Tidy
report he is discarding an unexpected tag ( in this case </font>) he didn't
free the node of that tag.

So in function ParseRow  ( in file: parser.c  line:1752) I added this line:

FreeNode( node );

In order to free this node, and it worked for that perticular page.

When I tested other pages, I found out the same probalm but in diffrent
places in the code, So I checked a bit further and found out
that tidy can discarde an unexpected tags in 68 locations (all of them in
file: parser.c), but in 15 places Tidy is not freeing the node after that.

So my qustion is, should I add:
	FreeNode( node );
to all of the 15 places, or maybe just to part of them?
Does my adding of this line can cause any harm to the program?

This is a sample page that has a <td> <font> </td> </font>, and that cause
the memory leak in function ParseRow
Thanks, Nadav. <<Page1.html>> 

Received on Thursday, 30 November 2000 13:38:27 UTC