[Dcmlib] Bug in gdcmDataEntry.cxx
Parikshit Prasad
pprasad at accelrys.com
Tue Feb 12 23:54:55 CET 2008
Hi,
Looks like there is a bug in DataEntry::DeleteBinArea(). I have copied the
code below.
void DataEntry::DeleteBinArea(void)
{
if (BinArea && SelfArea)
{
delete[] BinArea;
BinArea = NULL;
}
if (StrArea)
{
delete StrArea;
StrArea = 0;
}
if (StrArea)
{
delete StrHexaArea;
StrHexaArea = 0;
}
}
the last IF block should check for StrHexaArea rather than StrArea.
I am not aware of the entire gdcm code, but looking at this piece of code,
I feel that StrHexaArea will never get deleted and leads to memory leak.
Regards,
Parikshit
More information about the Dcmlib
mailing list