G_DoPlayDemo: Remove memory leak in pdemoname

This commit is contained in:
toaster 2023-02-03 18:16:18 +00:00
parent f378dfe3f6
commit 1efc5883e0

View file

@ -2987,6 +2987,7 @@ void G_DoPlayDemo(char *defdemoname)
{ {
snprintf(msg, 1024, M_GetText("Failed to read file '%s'.\n"), defdemoname); snprintf(msg, 1024, M_GetText("Failed to read file '%s'.\n"), defdemoname);
CONS_Alert(CONS_ERROR, "%s", msg); CONS_Alert(CONS_ERROR, "%s", msg);
Z_Free(pdemoname);
gameaction = ga_nothing; gameaction = ga_nothing;
M_StartMessage(msg, NULL, MM_NOTHING); M_StartMessage(msg, NULL, MM_NOTHING);
return; return;