diff options
author | Max Horn | 2004-07-26 23:16:37 +0000 |
---|---|---|
committer | Max Horn | 2004-07-26 23:16:37 +0000 |
commit | 1ab8ff040389a7125ebe2873f865b4eb83cfa0cb (patch) | |
tree | d7fbfca56c415d28b15e35090519cc346c78c2be | |
parent | 908723cc84b78fac6320e1613069e2a9139f2722 (diff) | |
download | scummvm-rg350-1ab8ff040389a7125ebe2873f865b4eb83cfa0cb.tar.gz scummvm-rg350-1ab8ff040389a7125ebe2873f865b4eb83cfa0cb.tar.bz2 scummvm-rg350-1ab8ff040389a7125ebe2873f865b4eb83cfa0cb.zip |
Fixed leak in Insane::readFileToMem
svn-id: r14347
-rw-r--r-- | scumm/insane/insane.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/scumm/insane/insane.cpp b/scumm/insane/insane.cpp index 6efa9229c6..32ceecc08e 100644 --- a/scumm/insane/insane.cpp +++ b/scumm/insane/insane.cpp @@ -586,15 +586,13 @@ int32 Insane::processKeyboard(void) { } void Insane::readFileToMem(const char *name, byte **buf) { - ScummFile *in; + ScummFile in; uint32 len; - in = new ScummFile(); - _vm->openFile(*in, name); - len = in->size(); + _vm->openFile(in, name); + len = in.size(); *buf = (byte *)malloc(len); - in->read(*buf, len); - in->close(); + in.read(*buf, len); } void Insane::startVideo(const char *filename, int num, int argC, int frameRate, |