aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/regex/regex.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/regex/regex.c b/src/regex/regex.c
index 54d38e4c0..637eac00d 100644
--- a/src/regex/regex.c
+++ b/src/regex/regex.c
@@ -1375,13 +1375,16 @@ static void
1375dfa_remove_dead_states (struct GNUNET_REGEX_Automaton *a) 1375dfa_remove_dead_states (struct GNUNET_REGEX_Automaton *a)
1376{ 1376{
1377 struct GNUNET_REGEX_State *s; 1377 struct GNUNET_REGEX_State *s;
1378 struct GNUNET_REGEX_State *s_next;
1378 struct GNUNET_REGEX_Transition *t; 1379 struct GNUNET_REGEX_Transition *t;
1379 int dead; 1380 int dead;
1380 1381
1381 GNUNET_assert (DFA == a->type); 1382 GNUNET_assert (DFA == a->type);
1382 1383
1383 for (s = a->states_head; NULL != s; s = s->next) 1384 for (s = a->states_head; NULL != s; s = s_next)
1384 { 1385 {
1386 s_next = s->next;
1387
1385 if (s->accepting) 1388 if (s->accepting)
1386 continue; 1389 continue;
1387 1390
@@ -2155,9 +2158,8 @@ nfa_add_question_op (struct GNUNET_REGEX_Context *ctx)
2155 2158
2156 new_nfa = nfa_fragment_create (start, end); 2159 new_nfa = nfa_fragment_create (start, end);
2157 nfa_add_states (new_nfa, a->states_head, a->states_tail); 2160 nfa_add_states (new_nfa, a->states_head, a->states_tail);
2158 automaton_fragment_clear (a);
2159
2160 GNUNET_CONTAINER_DLL_insert_tail (ctx->stack_head, ctx->stack_tail, new_nfa); 2161 GNUNET_CONTAINER_DLL_insert_tail (ctx->stack_head, ctx->stack_tail, new_nfa);
2162 automaton_fragment_clear (a);
2161} 2163}
2162 2164
2163 2165