Correct way of freeing memory in NGSPICE class
Strings created with strdup() should be deleted using free(), not delete.
This commit is contained in:
parent
fc0814caef
commit
d7e1152aa3
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue