diff --git a/src/pc/mods/mods_utils.c b/src/pc/mods/mods_utils.c index e04cfa1b1..833768ae5 100644 --- a/src/pc/mods/mods_utils.c +++ b/src/pc/mods/mods_utils.c @@ -44,8 +44,8 @@ static bool mods_incompatible_match(struct Mod* a, struct Mod* b) { return false; } - char* ai = a->incompatible; - char* bi = b->incompatible; + char* ai = strdup(a->incompatible); + char* bi = strdup(b->incompatible); char* atoken = NULL; char* btoken = NULL; char* arest = NULL; @@ -59,6 +59,9 @@ static bool mods_incompatible_match(struct Mod* a, struct Mod* b) { } } + free(ai); + free(bi); + return false; } @@ -330,4 +333,4 @@ bool directory_sanity_check(struct dirent* dir, char* dirPath, char* outPath) { } return true; -} \ No newline at end of file +}