Fix various potential memory leaks.

Though I expect most not to be exercised in practice.
This commit is contained in:
Jon Siwek 2013-09-12 15:23:52 -05:00
parent c3a4454892
commit 0b97343ff7
29 changed files with 142 additions and 32 deletions

View file

@ -304,6 +304,7 @@ DFA_State_Cache::~DFA_State_Cache()
{
assert(e->state);
delete e->hash;
Unref(e->state);
delete e;
}
}
@ -410,7 +411,10 @@ DFA_Machine::DFA_Machine(NFA_Machine* n, EquivClass* arg_ec)
(void) StateSetToDFA_State(state_set, start_state, ec);
}
else
{
start_state = 0; // Jam
delete ns;
}
}
DFA_Machine::~DFA_Machine()