COMMON: Fix a memory leak in Common::DumpFile
This commit is contained in:
parent
5eed7f091d
commit
fd4fa5e899
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue