diff --git a/src/cntlr.c b/src/cntlr.c index 7b110a127a9a3fab22aa1a4dcc7069f5489622b1..8cd3ea07a83fd574547829b9b5b6c7b7435c98ca 100644 --- a/src/cntlr.c +++ b/src/cntlr.c @@ -2715,6 +2715,7 @@ void run_controller(void) uloop_run(); out_exit: + cntlr_unload_steer_modules(c); map_unsubscribe(ctx, c->subscriber); cntlr_clean_stalist(c); cntlr_clean_bcnreqlist(c); diff --git a/src/steer_module.c b/src/steer_module.c index fbfe8f4f0857971421feba07b968bf47900588cc..b01b008f40fff475ca14410d757d8b9972edf6f6 100644 --- a/src/steer_module.c +++ b/src/steer_module.c @@ -78,6 +78,7 @@ static int cntlr_unload_steer_module(struct steer_control *sc) ret = plugin_unload(sc->handle); list_del(&sc->list); + free(sc); return !ret ? 0 : -1; }