fix memory leaks for #quit while in tutorial
The new change to reset discoveries and monster-stats when exiting the tutorial used dynamic data which wouldn't be freed if player used #quit and declined to resume the regular game. It turns out that such a leak was already present for start-of-game inventory that gets stashed away during the tutorial. In both cases, it could happen at most once per game so wasn't a big deal as far as memory leaks go.
This commit is contained in:
@@ -1210,6 +1210,7 @@ freedynamicdata(void)
|
||||
freeroleoptvals(); /* saveoptvals(&tnhfp) */
|
||||
cmdq_clear(CQ_CANNED);
|
||||
cmdq_clear(CQ_REPEAT);
|
||||
free_tutorial(); /* (only needed if quiting while in tutorial) */
|
||||
|
||||
/* some pointers in iflags */
|
||||
if (iflags.wc_font_map)
|
||||
|
||||
Reference in New Issue
Block a user