mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Command_Map_f, Command_QueueMap_f: Prevent memory leak on cheat-limited early-return
This commit is contained in:
parent
b72bc73d28
commit
80ed8b81b9
1 changed files with 4 additions and 0 deletions
|
|
@ -2920,6 +2920,8 @@ static void Command_Map_f(void)
|
||||||
if (ischeating && !usingcheats)
|
if (ischeating && !usingcheats)
|
||||||
{
|
{
|
||||||
CONS_Printf(M_GetText("Cheats must be enabled.\n"));
|
CONS_Printf(M_GetText("Cheats must be enabled.\n"));
|
||||||
|
Z_Free(realmapname);
|
||||||
|
Z_Free(mapname);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3397,6 +3399,8 @@ static void Command_QueueMap_f(void)
|
||||||
if (ischeating && !usingcheats)
|
if (ischeating && !usingcheats)
|
||||||
{
|
{
|
||||||
CONS_Printf(M_GetText("Cheats must be enabled.\n"));
|
CONS_Printf(M_GetText("Cheats must be enabled.\n"));
|
||||||
|
Z_Free(realmapname);
|
||||||
|
Z_Free(mapname);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue