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:
ahodgkinson
2006-07-13 22:45:23 +00:00
parent e9ebd6b246
commit 92f5cb4e4b

View File

@@ -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();