aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrichiesams2013-08-11 16:44:52 -0500
committerrichiesams2013-08-11 16:44:52 -0500
commitb9b8207a140531079f3e200e6858a8dc9cc7b5d2 (patch)
treeed690f8b225f1b19a158db375670099650525403
parent7e93b6407a14c3c3fe75f03667362fcf8555e69d (diff)
downloadscummvm-rg350-b9b8207a140531079f3e200e6858a8dc9cc7b5d2.tar.gz
scummvm-rg350-b9b8207a140531079f3e200e6858a8dc9cc7b5d2.tar.bz2
scummvm-rg350-b9b8207a140531079f3e200e6858a8dc9cc7b5d2.zip
ZVISION: Dispose of .zfs file streams after processing them
-rw-r--r--engines/zvision/zvision.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/zvision/zvision.cpp b/engines/zvision/zvision.cpp
index 72441eb8ad..7f925e9828 100644
--- a/engines/zvision/zvision.cpp
+++ b/engines/zvision/zvision.cpp
@@ -107,7 +107,10 @@ void ZVision::initialize() {
// Register the file entries within the zfs archives with the SearchMan
for (Common::ArchiveMemberList::iterator iter = list.begin(); iter != list.end(); ++iter) {
Common::String name = (*iter)->getName();
- ZfsArchive *archive = new ZfsArchive(name, (*iter)->createReadStream());
+ Common::SeekableReadStream *stream = (*iter)->createReadStream();
+ ZfsArchive *archive = new ZfsArchive(name, stream);
+
+ delete stream;
SearchMan.add(name, archive);
}