diff --git a/src/pattern.c b/src/pattern.c index a404ac34dd..5de9de1abf 100644 --- a/src/pattern.c +++ b/src/pattern.c @@ -1093,6 +1093,7 @@ void pat_prune_val(struct pattern_expr *expr) struct pattern_list *pat, *tmp; list_for_each_entry_safe(pat, tmp, &expr->patterns, list) { + LIST_DEL(&pat->list); free(pat->pat.data); free(pat); } @@ -1100,6 +1101,7 @@ void pat_prune_val(struct pattern_expr *expr) free_pattern_tree(&expr->pattern_tree); free_pattern_tree(&expr->pattern_tree_2); LIST_INIT(&expr->patterns); + expr->revision = rdtsc(); } void pat_prune_ptr(struct pattern_expr *expr) @@ -1107,6 +1109,7 @@ void pat_prune_ptr(struct pattern_expr *expr) struct pattern_list *pat, *tmp; list_for_each_entry_safe(pat, tmp, &expr->patterns, list) { + LIST_DEL(&pat->list); free(pat->pat.ptr.ptr); free(pat->pat.data); free(pat); @@ -1115,6 +1118,7 @@ void pat_prune_ptr(struct pattern_expr *expr) free_pattern_tree(&expr->pattern_tree); free_pattern_tree(&expr->pattern_tree_2); LIST_INIT(&expr->patterns); + expr->revision = rdtsc(); } void pat_prune_reg(struct pattern_expr *expr) @@ -1122,6 +1126,7 @@ void pat_prune_reg(struct pattern_expr *expr) struct pattern_list *pat, *tmp; list_for_each_entry_safe(pat, tmp, &expr->patterns, list) { + LIST_DEL(&pat->list); regex_free(pat->pat.ptr.ptr); free(pat->pat.data); free(pat); @@ -1130,6 +1135,7 @@ void pat_prune_reg(struct pattern_expr *expr) free_pattern_tree(&expr->pattern_tree); free_pattern_tree(&expr->pattern_tree_2); LIST_INIT(&expr->patterns); + expr->revision = rdtsc(); } /*