From d7e1152aa3d2d492921c2a8a66c9a097ded4038c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 1 Mar 2017 13:56:24 +0100 Subject: [PATCH] Correct way of freeing memory in NGSPICE class Strings created with strdup() should be deleted using free(), not delete. --- eeschema/sim/ngspice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eeschema/sim/ngspice.cpp b/eeschema/sim/ngspice.cpp index 9fcbee6d80..fb8d032064 100644 --- a/eeschema/sim/ngspice.cpp +++ b/eeschema/sim/ngspice.cpp @@ -206,7 +206,7 @@ bool NGSPICE::LoadNetlist( const string& aNetlist ) ngSpice_Circ( lines.data() ); for( auto line : lines ) - delete line; + free( line ); return true; }