FLAIM change. Fixed memory leak and crash in checkdb utility.
git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@669 0109f412-320b-0410-ab79-c3e0c5ffbbe6
This commit is contained in:
@@ -216,8 +216,8 @@ int main(
|
||||
int iArgC,
|
||||
char ** ppucArgV)
|
||||
{
|
||||
int iResCode = 0;
|
||||
F_Pool LogPool;
|
||||
int iResCode = 0;
|
||||
F_Pool * pLogPool = NULL;
|
||||
|
||||
gv_bBatchMode = FALSE;
|
||||
gv_bShutdown = FALSE;
|
||||
@@ -242,9 +242,15 @@ int main(
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
LogPool.poolInit( 1024);
|
||||
if( (pLogPool = f_new F_Pool) == NULL)
|
||||
{
|
||||
f_conStrOut( "\nCould not allocate a pool object.\n");
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
pLogPool->poolInit( 1024);
|
||||
|
||||
if( RC_BAD( LogPool.poolAlloc( MAX_LOG_BUF, (void **)&gv_pucLogBuffer)))
|
||||
if( RC_BAD( pLogPool->poolAlloc( MAX_LOG_BUF, (void **)&gv_pucLogBuffer)))
|
||||
{
|
||||
f_conStrOut( "\nCould not allocat memory.\n");
|
||||
goto Exit;
|
||||
@@ -301,6 +307,11 @@ Exit:
|
||||
gv_pFileSystem = NULL;
|
||||
}
|
||||
|
||||
if( pLogPool)
|
||||
{
|
||||
pLogPool->Release();
|
||||
}
|
||||
|
||||
f_conExit();
|
||||
FlmShutdown();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user