diff --git a/flaim/util/checkdb.cpp b/flaim/util/checkdb.cpp index ca67f77..04628e5 100644 --- a/flaim/util/checkdb.cpp +++ b/flaim/util/checkdb.cpp @@ -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();