mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
DIRECTOR: Plug memory leak in MacArchive
This commit is contained in:
@@ -254,7 +254,7 @@ Common::SeekableSubReadStreamEndian *MacArchive::getResource(uint32 tag, uint16
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return new Common::SeekableSubReadStreamEndian(stream, 0, stream->size(), true, DisposeAfterUse::NO);
|
||||
return new Common::SeekableSubReadStreamEndian(stream, 0, stream->size(), true, DisposeAfterUse::YES);
|
||||
}
|
||||
|
||||
// RIFF Archive code
|
||||
@@ -346,7 +346,7 @@ Common::SeekableSubReadStreamEndian *RIFFArchive::getResource(uint32 tag, uint16
|
||||
size--;
|
||||
}
|
||||
|
||||
return new Common::SeekableSubReadStreamEndian(_stream, _startOffset + offset, _startOffset + offset + size, true, DisposeAfterUse::NO);
|
||||
return new Common::SeekableSubReadStreamEndian(_stream, _startOffset + offset, _startOffset + offset + size, true, DisposeAfterUse::YES);
|
||||
}
|
||||
|
||||
// RIFX Archive code
|
||||
|
||||
Reference in New Issue
Block a user