Skip to content
Snippets Groups Projects
Commit 81c0b221 authored by rahix's avatar rahix
Browse files

Merge 'Clear config before reloading'

Closes #211

See merge request !411
parents c6a8a430 539b02ec
No related branches found
No related tags found
1 merge request!411fix(config): Clear config before reloading
Pipeline #4763 passed
......@@ -246,6 +246,21 @@ void load_config(void)
return;
}
/* Clear any existing configuration */
/* Don't free the blocks as we are most likely
* going to re-use all of them. */
config_block *current;
if (config_data != NULL) {
current = config_data;
while (true) {
memset(current->slots, 0, sizeof(current->slots));
if (current->next == NULL) {
break;
}
current = current->next;
}
}
char buf[128];
int nread;
parser_state s;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment