Re: [xml] Runtime error in xpath1.c example



Manuel González Castro said:
Hi,

I get a runtime error in the example "xpath1.c" whenever I provide a
namespace list as 3rd argument (last CVS under Windows 2000+MS VC++
6.0).

I think the problem is in line #185:

line #140:     xmlChar* nsListDup;
line #148:     nsListDup = xmlStrdup(nsList);
line #185:     free(nsListDup);
                     ^^^^
It should be:
line #185:     xmlFree(nsListDup);

At least this modification solves the problem in my platform.

Thanks for all the examples, they are really useful.
Manuel

Yes, I would agree your modification is correct (required for
certain platforms such as Windows, because of run-time library
differences).  I will change it in CVS in the near future (whenever
I next do a commit).  Thanks for the report.

Bill



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]