From a2da94d580884712b2cf49f3a368842173c93bbe Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Thu, 1 May 2003 12:36:36 +0000 Subject: fix leak svn-id: r7244 --- common/file.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'common/file.cpp') 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); -- cgit v1.2.3