[Scummvm-cvs-logs] CVS: scummvm/common file.cpp,1.27,1.28

Jonathan Gray khalek at users.sourceforge.net
Thu May 1 05:37:23 CEST 2003


Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv24318

Modified Files:
	file.cpp 
Log Message:
fix leak

Index: file.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/file.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- file.cpp	30 Apr 2003 12:43:54 -0000	1.27
+++ file.cpp	1 May 2003 12:36:36 -0000	1.28
@@ -133,6 +133,8 @@
 	_encbyte = encbyte;
 
 	int len = strlen(filename);
+	if (_name != 0)
+		delete [] _name;
 	_name = new char[len+1];
 	memcpy(_name, filename, len+1);
 





More information about the Scummvm-git-logs mailing list