henjo / libpsf

PSF simulation data c++ library
GNU Lesser General Public License v3.0
26 stars 23 forks source link

solve a crash problem and a memory leak problem #23

Open booknouse opened 6 months ago

booknouse commented 6 months ago

psf.cc,remote redundant close in destructor,because it would be called in ~PSFFile.psfile.cc, use new validate method, and add m_buffer's NULL judgement to Make the close method reentrant(cause crash).psfinternal.h, add ~PropertyBlock method, new validate method to PSFFile and change m_size to ssize_t.psfpropertyblock.cc, delete pointers in m_propmap to avoid memory leaks.