mirror of https://gitee.com/bigwinds/arangodb
initialize memory
This commit is contained in:
parent
39d72b1530
commit
85bf84e1bb
|
@ -230,9 +230,11 @@ static bool ParseArray (yyscan_t scanner, TRI_json_t* result) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// be paranoid and initialize the memory
|
||||||
|
TRI_InitNullJson(next);
|
||||||
|
|
||||||
if (! ParseValue(scanner, next, c)) {
|
if (! ParseValue(scanner, next, c)) {
|
||||||
// be paranoid
|
// be paranoid
|
||||||
TRI_InitNullJson(next);
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -340,9 +342,11 @@ static bool ParseObject (yyscan_t scanner, TRI_json_t* result) {
|
||||||
// we made sure with the reserve call that we haven't run out of memory
|
// we made sure with the reserve call that we haven't run out of memory
|
||||||
TRI_ASSERT_EXPENSIVE(next != nullptr);
|
TRI_ASSERT_EXPENSIVE(next != nullptr);
|
||||||
|
|
||||||
|
// be paranoid and initialize the memory
|
||||||
|
TRI_InitNullJson(next);
|
||||||
|
|
||||||
if (! ParseValue(scanner, next, c)) {
|
if (! ParseValue(scanner, next, c)) {
|
||||||
// be paranoid
|
// be paranoid
|
||||||
TRI_InitNullJson(next);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue