diff options
author | Denis Kasak | 2009-07-17 01:05:13 +0000 |
---|---|---|
committer | Denis Kasak | 2009-07-17 01:05:13 +0000 |
commit | 16530846acc8a9d0ededdf3de82f11d3260fee87 (patch) | |
tree | 79d7cf5f17b1bcdf92f6c2f17be3e3aadedbd1bd | |
parent | 8018216dea7ab54940ff8802685dd50a27522509 (diff) | |
download | scummvm-rg350-16530846acc8a9d0ededdf3de82f11d3260fee87.tar.gz scummvm-rg350-16530846acc8a9d0ededdf3de82f11d3260fee87.tar.bz2 scummvm-rg350-16530846acc8a9d0ededdf3de82f11d3260fee87.zip |
* Renamed BAFile::closeFile() to close()
* Fixed leak in BArchive::loadFileDFW()
svn-id: r42554
-rw-r--r-- | engines/draci/barchive.cpp | 4 | ||||
-rw-r--r-- | engines/draci/barchive.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/engines/draci/barchive.cpp b/engines/draci/barchive.cpp index cbe019f8b2..2a27e6a383 100644 --- a/engines/draci/barchive.cpp +++ b/engines/draci/barchive.cpp @@ -375,6 +375,8 @@ BAFile *BArchive::loadFileDFW(unsigned int i) const { assert(len == _files[i]._length && "Uncompressed file not of the expected length"); + delete[] buf; + return _files + i; } @@ -386,7 +388,7 @@ void BArchive::clearCache() { // Delete all cached data for (unsigned int i = 0; i < _fileCount; ++i) { - _files[i].closeFile(); + _files[i].close(); } } diff --git a/engines/draci/barchive.h b/engines/draci/barchive.h index 5a4f5155f7..7d26b65884 100644 --- a/engines/draci/barchive.h +++ b/engines/draci/barchive.h @@ -43,7 +43,7 @@ struct BAFile { byte _stopper; //!< Not used in BAR files, needed for DFW /** Releases the file data (for memory considerations) */ - void closeFile(void) { + void close(void) { delete[] _data; _data = NULL; } |