1
0
Fork 0

added OOM guard

This commit is contained in:
Jan Steemann 2012-07-04 13:50:35 +02:00
parent b906dd95b7
commit ef01fa3c4e
1 changed files with 4 additions and 0 deletions

View File

@ -1029,6 +1029,10 @@ TRI_shaper_t* TRI_OpenVocShaper (TRI_vocbase_t* vocbase,
}
shaper = TRI_Allocate(TRI_UNKNOWN_MEM_ZONE, sizeof(voc_shaper_t), false);
if (shaper == NULL) {
return NULL;
}
TRI_InitShaper(&shaper->base, TRI_UNKNOWN_MEM_ZONE);
InitVocShaper(shaper, collection);