diff options
-rw-r--r-- | service/validate.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/service/validate.c b/service/validate.c index ca9bb39..2e610c7 100644 --- a/service/validate.c +++ b/service/validate.c @@ -100,10 +100,9 @@ service_validate_del(struct service *s) list_for_each_entry_safe(v, n, &s->validators, list) { struct vrule *vr, *a; - avl_for_each_element_safe(&v->rules, vr, avl, a) { - avl_delete(&v->rules, &vr->avl); + avl_remove_all_elements(&v->rules, vr, avl, a) free(vr); - } + avl_delete(&validators, &v->avl); list_del(&v->list); free(v); |