Skip to content
Snippets Groups Projects
Commit 1af969d5 authored by Monster Iestyn's avatar Monster Iestyn
Browse files

Merge branch 'pk3_leak' into 'master'

Pk3 Leaks

See merge request !500
parents fb182369 8444379d
No related branches found
No related tags found
1 merge request!500Pk3 Leaks
......@@ -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;
}
......@@ -1326,8 +1328,9 @@ size_t W_ReadLumpHeaderPwad(UINT16 wad, UINT16 lump, void *dest, size_t size, si
{
size = 0;
zerr(zErr);
(void)inflateEnd(&strm);
}
(void)inflateEnd(&strm);
}
else
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment