1
0
Fork 0

handle OOM

This commit is contained in:
Jan Steemann 2013-07-28 10:47:53 +02:00
parent 097e8ad865
commit 61ea679395
1 changed files with 8 additions and 0 deletions

View File

@ -1208,6 +1208,14 @@ TRI_replication_logger_t* TRI_CreateReplicationLogger (TRI_vocbase_t* vocbase) {
IsEqualKeyClient,
NULL);
if (res != TRI_ERROR_NO_ERROR) {
// out of memory
FreeBuffers(logger);
TRI_Free(TRI_CORE_MEM_ZONE, logger);
return NULL;
}
TRI_InitReadWriteLock(&logger->_statusLock);
TRI_InitReadWriteLock(&logger->_clientsLock);
TRI_InitSpin(&logger->_idLock);