Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.6.0
-
None
-
None
-
Any
Description
MemBufInputSource::~MemBufInputSource()
{
if (fAdopted)
delete [] (XMLByte*)fSrcBytes;
}
This seems terribly wrong. Constructor initializes fSrcBytes
with its argument srcDocBytes and this never changes, so the
original argument string is deleted here and not a copy of it.
Actual creation and destruction of a copy if fAdopted is set
is handled in BinMemInputStream which is instantiated in MemBufInputSource::makeStream(). Therefore the code quoted
above should be removed from the destructor and it should do
nothing.
Regards
Nikolay