aboutsummaryrefslogtreecommitdiff
path: root/common/file.cpp
diff options
context:
space:
mode:
authorJonathan Gray2003-05-01 12:36:36 +0000
committerJonathan Gray2003-05-01 12:36:36 +0000
commita2da94d580884712b2cf49f3a368842173c93bbe (patch)
tree99fce69075042b661b045cbbee5eb07fca690303 /common/file.cpp
parent09abe32284e38ffc35c56c5f15d8c827abb31877 (diff)
downloadscummvm-rg350-a2da94d580884712b2cf49f3a368842173c93bbe.tar.gz
scummvm-rg350-a2da94d580884712b2cf49f3a368842173c93bbe.tar.bz2
scummvm-rg350-a2da94d580884712b2cf49f3a368842173c93bbe.zip
fix leak
svn-id: r7244
Diffstat (limited to 'common/file.cpp')
-rw-r--r--common/file.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/file.cpp b/common/file.cpp
index 35307d5618..ff666e820a 100644
--- a/common/file.cpp
+++ b/common/file.cpp
@@ -133,6 +133,8 @@ bool File::open(const char *filename, const char *directory, int mode, byte encb
_encbyte = encbyte;
int len = strlen(filename);
+ if (_name != 0)
+ delete [] _name;
_name = new char[len+1];
memcpy(_name, filename, len+1);