fix some memory leaks

This commit is contained in:
nhmall
2024-11-10 22:24:45 -05:00
parent d428beb8dd
commit e83e04dbb3
6 changed files with 103 additions and 12 deletions

View File

@@ -1177,6 +1177,8 @@ free_dungeons(void)
return;
}
extern int options_set_window_colors_flag; /* options.c */
/* free a lot of allocated memory which is ordinarily freed during save */
void
freedynamicdata(void)
@@ -1272,6 +1274,9 @@ freedynamicdata(void)
if (VIA_WINDOWPORT())
status_finish();
if (options_set_window_colors_flag)
options_free_window_colors();
/* last, because it frees data that might be used by panic() to provide
feedback to the user; conceivably other freeing might trigger panic */
sysopt_release(); /* SYSCF strings */