From bb3b4bfb8a305a11911e2b58677cf87e2368fe3a Mon Sep 17 00:00:00 2001 From: helly Date: Mon, 5 Jun 2006 22:12:05 +0000 Subject: [PATCH] - Fix memleaks (State::action) --- re2c/code.cc | 2 ++ re2c/dfa.cc | 1 + 2 files changed, 3 insertions(+) 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; } -- 2.50.1