mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-10 08:44:25 +00:00
More incorrect/inconsistent frees
This commit is contained in:
parent
5c51ad77f6
commit
2786c2095e
2 changed files with 3 additions and 6 deletions
|
|
@ -300,8 +300,7 @@ void PR_LoadProfiles(void)
|
|||
if (strcmp(srb2home,"."))
|
||||
gdfolder = srb2home;
|
||||
|
||||
Z_Free(save.buffer);
|
||||
save.p = NULL;
|
||||
P_SaveBufferFree(&save);
|
||||
I_Error("Not a valid Profile file.\nDelete %s (maybe in %s) and try again.", PROFILESFILE, gdfolder);
|
||||
}
|
||||
save.p += headerlen;
|
||||
|
|
@ -309,8 +308,7 @@ void PR_LoadProfiles(void)
|
|||
version = READUINT8(save.p);
|
||||
if (version > PROFILEVER)
|
||||
{
|
||||
Z_Free(save.buffer);
|
||||
save.p = NULL;
|
||||
P_SaveBufferFree(&save);
|
||||
I_Error("Existing %s is from the future! (expected %d, got %d)", PROFILESFILE, PROFILEVER, version);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -749,8 +749,7 @@ void P_WriteThings(void)
|
|||
filename = va("newthings-%s.lmp", G_BuildMapName(gamemap));
|
||||
|
||||
FIL_WriteFile(filename, save.buffer, length);
|
||||
free(save.buffer);
|
||||
save.p = NULL;
|
||||
P_SaveBufferFree(&save);
|
||||
|
||||
CONS_Printf(M_GetText("%s saved.\n"), filename);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue