mirror of
https://github.com/FWGS/hlsdk-xash3d
synced 2024-11-25 19:29:13 +01:00
Fix possible memory leak.
This commit is contained in:
parent
c2064d88ed
commit
0324eb0431
@ -825,7 +825,7 @@ bool CHudSpectator::ParseOverviewFile()
|
||||
char token[1024] = { 0 };
|
||||
float height;
|
||||
|
||||
char *pfile = NULL;
|
||||
char *afile = NULL, *pfile = NULL;
|
||||
|
||||
memset( &m_OverviewData, 0, sizeof(m_OverviewData) );
|
||||
|
||||
@ -850,7 +850,7 @@ bool CHudSpectator::ParseOverviewFile()
|
||||
|
||||
sprintf( filename, "overviews/%s.txt", levelname );
|
||||
|
||||
pfile = (char *)gEngfuncs.COM_LoadFile( filename, 5, NULL );
|
||||
afile = pfile = (char *)gEngfuncs.COM_LoadFile( filename, 5, NULL );
|
||||
|
||||
if( !pfile )
|
||||
{
|
||||
@ -963,7 +963,7 @@ bool CHudSpectator::ParseOverviewFile()
|
||||
}
|
||||
}
|
||||
|
||||
gEngfuncs.COM_FreeFile( pfile );
|
||||
gEngfuncs.COM_FreeFile( afile );
|
||||
|
||||
m_mapZoom = m_OverviewData.zoom;
|
||||
m_mapOrigin = m_OverviewData.origin;
|
||||
|
Loading…
Reference in New Issue
Block a user