mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-30 19:24:23 +01:00
Fix memory leak in CSO reading.
This commit is contained in:
1 parent
b82feed816
commit
2ea113369b
1 file changed
+3
@@ -165,14 +165,17 @@ bool CISOFileBlockDevice::ReadBlock(int blockNumber, u8 *outPtr)
|
||||
//if (status != Z_OK)
|
||||
{
|
||||
ERROR_LOG(LOADER, "block %d:inflate : %s[%d]\n", blockNumber, (z.msg) ? z.msg : "error", status);
|
||||
inflateEnd(&z);
|
||||
return 1;
|
||||
}
|
||||
int cmp_size = blockSize - z.avail_out;
|
||||
if (cmp_size != (int)blockSize)
|
||||
{
|
||||
ERROR_LOG(LOADER, "block %d : block size error %d != %d\n", blockNumber, cmp_size, blockSize);
|
||||
inflateEnd(&z);
|
||||
return 1;
|
||||
}
|
||||
inflateEnd(&z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
Reference in new issue
Block a user