mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
Fix memory leak
svn-id: r23848
This commit is contained in:
parent
e78a81fe45
commit
ab82dc3f9c
@ -95,8 +95,6 @@ bool Resource::loadPakFile(const Common::String &filename) {
|
||||
|
||||
uint32 size = 0;
|
||||
|
||||
FilesystemNode *fsNode = new FilesystemNode(ConfMan.get("path") + filename);
|
||||
|
||||
Common::File handle;
|
||||
if (!fileHandle(filename.c_str(), &size, handle)) {
|
||||
warning("couldn't load file: '%s'", filename.c_str());
|
||||
@ -104,6 +102,7 @@ bool Resource::loadPakFile(const Common::String &filename) {
|
||||
}
|
||||
|
||||
PAKFile *file = 0;
|
||||
FilesystemNode *fsNode = new FilesystemNode(ConfMan.get("path") + filename);
|
||||
|
||||
if (handle.name() == filename) {
|
||||
file = new PAKFile(fsNode->name().c_str(), handle.name(), (_engine->features() & GF_AMIGA) != 0);
|
||||
|
Loading…
Reference in New Issue
Block a user