-/* $OpenBSD: radiusd_eap2mschap.c,v 1.2 2024/07/17 11:19:27 yasuoka Exp $ */
+/* $OpenBSD: radiusd_eap2mschap.c,v 1.3 2024/08/16 09:52:16 yasuoka Exp $ */
/*
* Copyright (c) 2024 Internet Initiative Japan Inc.
module_start(eap2mschap.base);
event_loop(0);
+
module_destroy(eap2mschap.base);
+ event_loop(0);
+ event_base_free(NULL);
+
exit(EXIT_SUCCESS);
}
evtimer_del(&self->ev_eapt);
- RB_FOREACH_SAFE(req, access_reqt, &self->eapt, reqt)
+ RB_FOREACH_SAFE(req, access_reqt, &self->eapt, reqt) {
+ RB_REMOVE(access_reqt, &self->eapt, req);
access_request_free(req);
- TAILQ_FOREACH_SAFE(req, &self->reqq, next, reqt)
+ }
+ TAILQ_FOREACH_SAFE(req, &self->reqq, next, reqt) {
+ TAILQ_REMOVE(&self->reqq, req, next);
access_request_free(req);
+ }
}
void
-/* $OpenBSD: radiusd_ipcp.c,v 1.10 2024/08/16 09:50:09 yasuoka Exp $ */
+/* $OpenBSD: radiusd_ipcp.c,v 1.11 2024/08/16 09:52:16 yasuoka Exp $ */
/*
* Copyright (c) 2024 Internet Initiative Japan Inc.
ipcp_fini(&module_ipcp);
event_loop(0);
+ event_base_free(NULL);
exit(EXIT_SUCCESS);
}
struct user *user, *usert;
struct module_ipcp_ctrlconn *ctrl, *ctrlt;
struct module_ipcp_dae *dae, *daet;
+ struct ipcp_address *addr, *addrt;
RB_FOREACH_SAFE(assign, assigned_ipv4_tree, &self->ipv4s, assignt)
ipcp_ipv4_release(self, assign);
- RB_FOREACH_SAFE(user, user_tree, &self->users, usert)
+ RB_FOREACH_SAFE(user, user_tree, &self->users, usert) {
+ RB_REMOVE(user_tree, &self->users, user);
free(user);
+ }
TAILQ_FOREACH_SAFE(ctrl, &self->ctrls, next, ctrlt)
free(ctrl);
TAILQ_FOREACH_SAFE(dae, &self->daes, next, daet) {
}
free(dae);
}
+ TAILQ_FOREACH_SAFE(addr, &self->addrs, next, addrt)
+ free(addr);
if (evtimer_pending(&self->ev_timer, NULL))
evtimer_del(&self->ev_timer);
module_destroy(self->base);
free(str);
return (-1);
}
+ free(str);
if (salen < ai->ai_addrlen) {
freeaddrinfo(ai);
- free(str);
return (-1);
}
memcpy(sa, ai->ai_addr, ai->ai_addrlen);