IMAGE: Fix memory leak in Cel3DODecoder on error. PVS-Studio V773

This commit is contained in:
sluicebox 2023-10-30 11:22:10 -07:00
parent d76c06e648
commit 0446cac990

View file

@ -108,8 +108,10 @@ bool Cel3DODecoder::loadStream(Common::SeekableReadStream &stream) {
}
// Only RGB555 is supported
if ((pre0 & 0x17) != 0x16)
if ((pre0 & 0x17) != 0x16) {
delete surface;
return false;
}
if(!(flags & kCCBPacked)) {
// RAW