Instead of scanning all elements from the expression and using the
slow delete path there, let's use the faster way which involves
pat_delete_gen() while the elements are detached from ther reference.
LIST_DEL_INIT(&bref->users);
bref->ref = NULL;
}
+ pat_delete_gen(ref, elt);
LIST_DEL(&elt->list);
- LIST_DEL(&elt->list_head);
- LIST_DEL(&elt->tree_head);
free(elt->pattern);
free(elt->sample);
free(elt);
LIST_DEL(&replace->head);
list_for_each_entry(expr, &ref->pat, list) {
- expr->pat_head->prune(expr);
list_for_each_entry(elt, &ref->head, list) {
char *err = NULL;
struct sample_data *data = NULL;