1
0
Fork 0

Fix a wrong allocation for a TRI_aql_node_t.

This commit is contained in:
Max Neunhoeffer 2014-07-18 16:10:56 +02:00
parent fad9017ae0
commit 69c1a399b4
1 changed files with 6 additions and 4 deletions

View File

@ -216,10 +216,12 @@ static TRI_aql_node_t* CreateNodeUserFcall (TRI_aql_context_t* const context,
////////////////////////////////////////////////////////////////////////////////
TRI_aql_node_t* TRI_CreateNodeNopAql (void) {
TRI_aql_node_t* node = (TRI_aql_node_t*) TRI_Allocate(TRI_UNKNOWN_MEM_ZONE, sizeof(TRI_aql_node_t), false);
if (node == NULL) {
return NULL;
TRI_aql_node_t* node;
try {
node = new TRI_aql_node_t;
}
catch (std::exception&) {
return nullptr;
}
node->_type = TRI_AQL_NODE_NOP;