[Scummvm-git-logs] scummvm master -> fd4fa5e899ec7c9ca62a059e4fab36c57e7c0f8d
bgK
bastien.bouclet at gmail.com
Sat Jun 1 13:59:59 CEST 2019
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
fd4fa5e899 COMMON: Fix a memory leak in Common::DumpFile
Commit: fd4fa5e899ec7c9ca62a059e4fab36c57e7c0f8d
https://github.com/scummvm/scummvm/commit/fd4fa5e899ec7c9ca62a059e4fab36c57e7c0f8d
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2019-06-01T13:59:08+02:00
Commit Message:
COMMON: Fix a memory leak in Common::DumpFile
Changed paths:
common/file.cpp
diff --git a/common/file.cpp b/common/file.cpp
index 6320838..0d760cb 100644
--- a/common/file.cpp
+++ b/common/file.cpp
@@ -162,8 +162,12 @@ bool DumpFile::open(const String &filename, bool createPath) {
subpath.erase(i);
if (subpath.empty()) continue;
AbstractFSNode *node = g_system->getFilesystemFactory()->makeFileNodePath(subpath);
- if (node->exists()) continue;
+ if (node->exists()) {
+ delete node;
+ continue;
+ }
if (!node->create(true)) warning("DumpFile: unable to create directories from path prefix");
+ delete node;
}
}
}
More information about the Scummvm-git-logs
mailing list