mirror of https://gitee.com/bigwinds/arangodb
memory zone fix
This commit is contained in:
parent
c00993637d
commit
6249b1d5ab
|
@ -934,7 +934,7 @@ void TRI_CopyCollectionInfo (TRI_col_info_t* dst, const TRI_col_info_t* const sr
|
|||
dst->_waitForSync = src->_waitForSync;
|
||||
|
||||
if (src->_keyOptions) {
|
||||
dst->_keyOptions = TRI_CopyJson(TRI_CORE_MEM_ZONE, src->_keyOptions);
|
||||
dst->_keyOptions = TRI_CopyJson(TRI_UNKNOWN_MEM_ZONE, src->_keyOptions);
|
||||
}
|
||||
else {
|
||||
dst->_keyOptions = NULL;
|
||||
|
@ -949,7 +949,7 @@ void TRI_CopyCollectionInfo (TRI_col_info_t* dst, const TRI_col_info_t* const sr
|
|||
|
||||
void TRI_FreeCollectionInfoOptions (TRI_col_info_t* parameter) {
|
||||
if (parameter->_keyOptions != NULL) {
|
||||
TRI_FreeJson(TRI_CORE_MEM_ZONE, parameter->_keyOptions);
|
||||
TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, parameter->_keyOptions);
|
||||
parameter->_keyOptions = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -1418,7 +1418,7 @@ int TRI_LoadCollectionInfo (char const* path,
|
|||
}
|
||||
else if (value->_type == TRI_JSON_ARRAY) {
|
||||
if (TRI_EqualString(key->_value._string.data, "keyOptions")) {
|
||||
parameter->_keyOptions = TRI_CopyJson(TRI_CORE_MEM_ZONE, value);
|
||||
parameter->_keyOptions = TRI_CopyJson(TRI_UNKNOWN_MEM_ZONE, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,6 +111,7 @@ static int TraditionalInit (TRI_key_generator_t* const generator,
|
|||
traditional_keygen_t* data;
|
||||
|
||||
data = (traditional_keygen_t*) TRI_Allocate(TRI_UNKNOWN_MEM_ZONE, sizeof(traditional_keygen_t), false);
|
||||
|
||||
if (data == NULL) {
|
||||
return TRI_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
@ -314,6 +315,7 @@ static int AutoIncrementInit (TRI_key_generator_t* const generator,
|
|||
autoincrement_keygen_t* data;
|
||||
|
||||
data = (autoincrement_keygen_t*) TRI_Allocate(TRI_UNKNOWN_MEM_ZONE, sizeof(autoincrement_keygen_t), false);
|
||||
|
||||
if (data == NULL) {
|
||||
return TRI_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue