[Dcmlib] Bug in gdcmDataEntry.cxx

Jean-Pierre ROUX jean-pierre.roux at creatis.insa-lyon.fr
Wed Feb 13 08:36:12 CET 2008


At 14:54 -0800 12/02/08, Parikshit Prasad wrote:
>Hi,


Hi, Parikshit.

Thx a lot for your code review.
I modify the code, and I add your name to the 'contributors list'.
Have a nice day.
Jean-Pierre Roux


>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
>
>_______________________________________________
>Dcmlib mailing list
>Dcmlib at creatis.insa-lyon.fr
>http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib

  Jean-Pierre ROUX
   CREATIS - CNRS UMR 5220, INSERM U 630
   Laboratoire de Radiologie Experimentale
   Hopital Cardiologique
   28 Avenue du Doyen LEPINE
   B.P. Lyon-Montchat
   69394 Lyon Cedex 03
 
   Tel      : (+33) 04 72 35 74 12
   Fax      : (+33) 04 72 68 49 16
   URL      : http://www.creatis.univ-lyon1.fr/~jpr
   e-mail   : jpr at creatis.univ-lyon1.fr
								   



More information about the Dcmlib mailing list