Skip to content
Snippets Groups Projects
Commit 77e889bc authored by Filip Matusiak's avatar Filip Matusiak
Browse files

Properly clear scclist

parent 51401cd2
Branches
No related tags found
1 merge request!181Fix memory leaks found using valgrind in steering
......@@ -185,6 +185,18 @@ int clean_cred_list(struct controller_config *cfg)
return 0;
}
int clean_scclist_list(struct controller_config *cfg)
{
struct steer_control_config *p = NULL, *tmp;
list_for_each_entry_safe(p, tmp, &cfg->scclist, list) {
list_del(&p->list);
free(p);
}
return 0;
}
static void stax_add_entry(struct list_head *h, char *sta_macstr)
{
struct stax *n;
......@@ -1574,6 +1586,7 @@ uint8_t cntlr_config_reload(struct controller_config *cfg)
int cntlr_config_clean(struct controller_config *cfg)
{
clean_scclist_list(cfg);
clean_cred_list(cfg);
clean_agent_policies(cfg); /* cleans nodelist */
clean_radio_list(&cfg->radiolist);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment