xml-rpc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glen Lewis" <gle...@lspeed.com>
Subject CDATA leaks in XmlRpc client classes
Date Fri, 01 Nov 2002 23:41:13 GMT
XmlRpc.parse() initializes the "cdata" field and then clears it ( by calling setLength(0) )
upon subsequent calls to parse().  This results in a memory leak between calls to parse(),
since the "cdata" field persists as long as the XmlRpc object.  In my particular case, a large
logfile was being passed as a parameter in a response, and the "cdata" leak was many megs
in size - it ended up consuming all the memory available to my client application.

I fixed it (somewhat aggressively) by changing the line in XmlRpc.java that reads:
		parser.parse (new InputSource (is));
			parser.parse (new InputSource (is));
			cdata = null;

However, I am not a developer for this project - would someone more important please consider
this change for your source code?

Glen Lewis

View raw message