Skip to content
Snippets Groups Projects

fix(config): Clear config before reloading

Merged schneider requested to merge schneider/211-config-reload into master
All threads resolved!
1 file
+ 15
0
Compare changes
  • Side-by-side
  • Inline
@@ -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;
Loading