Pcbnew, Cvpcb: fix Bug #1355883 . Due to a missing call to a delete operator in CMP_READER class (also creates memory leak).

This commit is contained in:
jean-pierre charras 2014-08-12 19:52:12 +02:00
parent 3a62a59514
commit 5b28980a05
1 changed files with 15 additions and 0 deletions

View File

@ -55,11 +55,26 @@ class CMP_READER
LINE_READER* m_lineReader; ///< The line reader to read.
public:
/**
* CMP_READER constructor.
* @param aLineReader is a LINE_READER (in fact a FILE_LINE_READER)
* which is owned by me ( and deleted by me) to read
* the component footprint link file.
*/
CMP_READER( LINE_READER* aLineReader )
{
m_lineReader = aLineReader;
}
~CMP_READER()
{
if( m_lineReader )
{
delete m_lineReader;
m_lineReader = NULL;
}
}
/**
* Function Load
* read the *.cmp file format contains the component footprint assignments created by CvPcb