From 1efc5883e0925038aa51a0d778d8aa3bdb0dc85b Mon Sep 17 00:00:00 2001 From: toaster Date: Fri, 3 Feb 2023 18:16:18 +0000 Subject: [PATCH] G_DoPlayDemo: Remove memory leak in pdemoname --- src/g_demo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/g_demo.c b/src/g_demo.c index 17a8e4865..ddf1e243f 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -2987,6 +2987,7 @@ void G_DoPlayDemo(char *defdemoname) { snprintf(msg, 1024, M_GetText("Failed to read file '%s'.\n"), defdemoname); CONS_Alert(CONS_ERROR, "%s", msg); + Z_Free(pdemoname); gameaction = ga_nothing; M_StartMessage(msg, NULL, MM_NOTHING); return;