When uri_auth admin rules were implemented in
474be415
("[MEDIUM] stats: add an admin level") no attempt was made to free the
list of allocated rules, which makes valgrind unhappy upon deinit when
"stats admin" is used in the config.
To fix the issue, let's cleanup the admin rules list upon deinit where
uri_auth freeing is already handled.
While this could be backported to every stable versions, given how minor
this is and has no impact on the dying process, it is probably not worth
the effort.
while (ua) {
struct stat_scope *scope, *scopep;
+ struct stats_admin_rule *rule, *ruleb;
uap = ua;
ua = ua->next;
userlist_free(uap->userlist);
free_act_rules(&uap->http_req_rules);
+ list_for_each_entry_safe(rule, ruleb, &uap->admin_rules, list) {
+ LIST_DELETE(&rule->list);
+ free_acl_cond(rule->cond);
+ free(rule);
+ }
scope = uap->scope;
while (scope) {