destroy the tmalloced diag, if rshunt option was enabled

This commit is contained in:
Holger Vogt 2018-09-01 09:11:33 +02:00
parent 2e9c28c79a
commit 12c864fb5a
1 changed files with 3 additions and 0 deletions

View File

@ -18,6 +18,7 @@ Author: 1985 Thomas L. Quarles
#ifdef XSPICE
#include "ngspice/evtproto.h"
#include "ngspice/mif.h"
#include "ngspice/enh.h"
#endif
int
@ -88,6 +89,8 @@ CKTdestroy(CKTcircuit *ckt)
#ifdef XSPICE
EVTdest(ckt->evt);
if (ckt->enh->rshunt_data.enabled)
FREE(ckt->enh->rshunt_data.diag);
FREE(ckt->enh);
FREE(ckt->evt);
#endif