mirror of https://gitee.com/bigwinds/arangodb
Fix a use after free in RestAqlHandler.
This commit is contained in:
parent
4503d7a982
commit
e74e3ac8db
|
@ -841,6 +841,7 @@ void RestAqlHandler::handleUseQuery (std::string const& operation,
|
|||
|
||||
try {
|
||||
res = query->engine()->shutdown(errorCode); // pass errorCode to shutdown
|
||||
answerBody("stats", query->getStats());
|
||||
_queryRegistry->destroy(_vocbase, _qId, errorCode);
|
||||
}
|
||||
catch (...) {
|
||||
|
@ -851,7 +852,6 @@ void RestAqlHandler::handleUseQuery (std::string const& operation,
|
|||
}
|
||||
answerBody("error", res == TRI_ERROR_NO_ERROR ? Json(false) : Json(true))
|
||||
("code", Json(static_cast<double>(res)));
|
||||
answerBody.set("stats", query->getStats());
|
||||
}
|
||||
else {
|
||||
LOG_ERROR("Unknown operation!");
|
||||
|
|
Loading…
Reference in New Issue