--- a/src/server/config/keyfile.c Tue Aug 13 22:14:32 2019 +0200 +++ b/src/server/config/keyfile.c Sat Sep 24 16:26:10 2022 +0200 @@ -31,7 +31,7 @@ #include "keyfile.h" -KeyfileConfig *load_keyfile_config(char *file) { +KeyfileConfig *load_keyfile_config(const char *file) { FILE *in = fopen(file, "r"); if(in == NULL) { return NULL; @@ -39,7 +39,7 @@ KeyfileConfig *conf = malloc(sizeof(KeyfileConfig)); conf->parser.parse = keyfile_parse; - conf->file = file; + conf->file = strdup(file); conf->users = NULL; int r = cfg_parse_basic_file((ConfigParser*)conf, in);