Fix memory leak. Now I'm down to 11 leaks for 384 total leaked bytes. It looks like some of those are coming from SDL. Still, I can live with 384 bytes.

This commit is contained in:
Steve Checkoway
2004-07-21 06:18:01 +00:00
parent 26d8a0b860
commit f85c5d7375
+2 -2
View File
@@ -1196,7 +1196,7 @@ CString XENTITYS::Ref2Entity( const char* estr )
{
int len = strlen(estr);
// char* esbuf = es.GetBufferSetLength( len+1 );
char* szTemp = new char[len+1];
char szTemp[len+1];
if( szTemp )
Ref2Entity( estr, szTemp, len );
es = szTemp;
@@ -1214,7 +1214,7 @@ CString XENTITYS::Entity2Ref( const char* str )
return CString(str);
int len = strlen(str) + nEntityCount*10 ;
//char* sbuf = s.GetBufferSetLength( len+1 );
char* szTemp = new char[len+1];
char szTemp[len+1];
if( szTemp )
Entity2Ref( str, szTemp, len );
s = szTemp;