diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-05-25 21:01:30 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-05-25 21:01:30 +0200 |
commit | 5659c8226cc7b0d09ab255525f8951e35cf6ac2a (patch) | |
tree | 156728f0207eb1c677df0f099e355d701f74fa95 | |
parent | bdbd2ea3fb127c7dfb2f591e4d2ab11a2c106e0a (diff) | |
download | unitd-5659c8226cc7b0d09ab255525f8951e35cf6ac2a.tar unitd-5659c8226cc7b0d09ab255525f8951e35cf6ac2a.zip |
service: use avl_remove_all_elements()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-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); |