mirror of https://gitee.com/bigwinds/arangodb
added OOM guard
This commit is contained in:
parent
b906dd95b7
commit
ef01fa3c4e
|
@ -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);
|
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);
|
TRI_InitShaper(&shaper->base, TRI_UNKNOWN_MEM_ZONE);
|
||||||
InitVocShaper(shaper, collection);
|
InitVocShaper(shaper, collection);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue