From: helly Date: Mon, 5 Jun 2006 22:12:05 +0000 (+0000) Subject: - Fix memleaks (State::action) X-Git-Tag: 0.13.6~276 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bb3b4bfb8a305a11911e2b58677cf87e2368fe3a;p=re2c - Fix memleaks (State::action) --- diff --git a/re2c/code.cc b/re2c/code.cc index 75c1ad6f..784b33eb 100644 --- a/re2c/code.cc +++ b/re2c/code.cc @@ -1407,6 +1407,7 @@ void DFA::emit(std::ostream &o, uint ind) if (s->go.span[i].to && !s->go.span[i].to->rule) { delete s->action; + s->action = NULL; if (saves[s->rule->accept] == ~0u) { @@ -1500,6 +1501,7 @@ void DFA::emit(std::ostream &o, uint ind) findBaseState(); delete head->action; + head->action = NULL; if (bFlag) { diff --git a/re2c/dfa.cc b/re2c/dfa.cc index 2d3779f4..dcd6ff6a 100644 --- a/re2c/dfa.cc +++ b/re2c/dfa.cc @@ -189,6 +189,7 @@ State::State() State::~State() { + delete action; delete [] kernel; delete [] go.span; }