[xml] Memory Leaks in parse3.c example
- From: Chris Johnson <chris dolphtech com>
- To: xml gnome org
- Subject: [xml] Memory Leaks in parse3.c example
- Date: Tue, 08 Aug 2006 09:04:20 -0400
All -
While working with parser3.c example
(http://xmlsoft.org/examples/parse3.c) on Solaris 8 Rational Purify
identifies several areas as having leaked memory.
Modifying parse3.c to
while(1)
example3Func(document, 6);
and closely monitoring the process using 'top' clearly shows the process
eating memory.
Any feedback on identified problem areas would be very helpful.
..Chris
------ SNIPPETS FROM RATIONAL PURIFY ----------------
main [parse3.c:47]
* between the version it was compiled for and the
actual shared
* library used.
*/
=> LIBXML_TEST_VERSION
example3Func(document, 6);
example3Func [parse3.c:33]
* The document being in memory, it have no base
per RFC 2396,
* and the "noname.xml" argument will serve as its
base.
*/
=> doc = xmlReadMemory(content, length, "noname.xml",
NULL, 0);
if (doc == NULL) {
fprintf(stderr, "Failed to parse document\n");
return;
main [parse3.c:54]
/*
* Cleanup function for the XML library.
*/
=> xmlCleanupParser();
/*
* this is to debug memory for regression tests
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]