mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
Free the zentries
This commit is contained in:
parent
83da71f809
commit
8444379d53
1 changed files with 5 additions and 3 deletions
|
@ -565,14 +565,14 @@ static lumpinfo_t* ResGetLumpsZip (FILE* handle, UINT16* nlmp)
|
|||
{
|
||||
CONS_Alert(CONS_ERROR, "Failed to read central directory (%s)\n", strerror(ferror(handle)));
|
||||
Z_Free(lumpinfo);
|
||||
free(zentry);
|
||||
free(zentries);
|
||||
return NULL;
|
||||
}
|
||||
if (memcmp(zentry->signature, pat_central, 4))
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, "Central directory is corrupt\n");
|
||||
Z_Free(lumpinfo);
|
||||
free(zentry);
|
||||
free(zentries);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -585,7 +585,7 @@ static lumpinfo_t* ResGetLumpsZip (FILE* handle, UINT16* nlmp)
|
|||
{
|
||||
CONS_Alert(CONS_ERROR, "Unable to read lumpname (%s)\n", strerror(ferror(handle)));
|
||||
Z_Free(lumpinfo);
|
||||
free(zentry);
|
||||
free(zentries);
|
||||
free(fullname);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -627,6 +627,8 @@ static lumpinfo_t* ResGetLumpsZip (FILE* handle, UINT16* nlmp)
|
|||
}
|
||||
}
|
||||
|
||||
free(zentries);
|
||||
|
||||
*nlmp = numlumps;
|
||||
return lumpinfo;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue