mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-20 01:11:18 +00:00
plug a memory leak when saving games
This commit is contained in:
parent
ece4df298e
commit
b1b7c49b11
1 changed files with 4 additions and 1 deletions
|
@ -532,6 +532,7 @@ static void
|
|||
Host_Savegame_f (void)
|
||||
{
|
||||
char name[256];
|
||||
char *save_text;
|
||||
QFile *f;
|
||||
int i;
|
||||
|
||||
|
@ -582,7 +583,9 @@ Host_Savegame_f (void)
|
|||
return;
|
||||
}
|
||||
|
||||
Qprintf (f, "%s\n%s", PROGRAM, PL_WritePropertyList (game_dict ()));
|
||||
save_text = PL_WritePropertyList (game_dict ());
|
||||
Qprintf (f, "%s\n%s", PROGRAM, save_text);
|
||||
free (save_text);
|
||||
|
||||
Qclose (f);
|
||||
Con_Printf ("done.\n");
|
||||
|
|
Loading…
Reference in a new issue