From 1578348fdf8958213890798b06625ed0128e452e Mon Sep 17 00:00:00 2001 From: rlar Date: Thu, 17 Mar 2016 20:17:09 +0100 Subject: [PATCH] frontend/inp.c, inp_evaluate_temper(), fix memory hole --- src/frontend/inp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frontend/inp.c b/src/frontend/inp.c index f620a3188..eedf9cd1a 100644 --- a/src/frontend/inp.c +++ b/src/frontend/inp.c @@ -1560,6 +1560,8 @@ inp_evaluate_temper(void) for(d = devtlist; d; d = d->next) { IFeval((IFparseTree *) d->pt, 1e-12, &result, NULL, NULL); + if (d->wlend->wl_word) + tfree(d->wlend->wl_word); d->wlend->wl_word = tprintf("%g", result); com_alter(d->wl); } @@ -1572,6 +1574,8 @@ inp_evaluate_temper(void) if (ft_sim->findModel (ft_curckt->ci_ckt, name) == NULL) continue; IFeval((IFparseTree *) d->pt, 1e-12, &result, NULL, NULL); + if (d->wlend->wl_word) + tfree(d->wlend->wl_word); d->wlend->wl_word = tprintf("%g", result); com_altermod(d->wl); }