Correct way of freeing memory in NGSPICE class

Strings created with strdup() should be deleted using free(), not
delete.
This commit is contained in:
Maciej Suminski 2017-03-01 13:56:24 +01:00
parent fc0814caef
commit d7e1152aa3
1 changed files with 1 additions and 1 deletions

View File

@ -206,7 +206,7 @@ bool NGSPICE::LoadNetlist( const string& aNetlist )
ngSpice_Circ( lines.data() ); ngSpice_Circ( lines.data() );
for( auto line : lines ) for( auto line : lines )
delete line; free( line );
return true; return true;
} }