Skip to content

Commit bbaa2bf

Browse files
committed
Could it be the free()s position or I am just being stupid?
the rest of the code should work just fine (and it does on MacOS and Linux), I'm honestly bummed
1 parent d07d521 commit bbaa2bf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,16 @@ int main(int argc, char* argv[]) {
174174
if(chdir(dirPath) != 0) {
175175
mrb_warn(mrb, "Couldn't change working directory to %s", dirPath);
176176
}
177-
free(dirPath);
178177

179178
int exitCode = loadGame(mrb, path, argc, argv);
180-
free(path);
181179

182180
if(mrb->exc) {
183181
mrb_print_error(mrb);
184182
exitCode = 1;
185183
}
186184

185+
free(dirPath);
186+
free(path);
187187
PHYSFS_deinit();
188188
mrb_close(mrb);
189189
return exitCode;

0 commit comments

Comments
 (0)