0
0
Fork 0
mirror of https://git.code.sf.net/p/quake/quakeforge synced 2025-04-22 17:45:37 +00:00

plug a memory leak when saving games

This commit is contained in:
Bill Currie 2007-05-13 03:34:49 +00:00 committed by Jeff Teunissen
parent ece4df298e
commit b1b7c49b11

View file

@ -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");