1
0
Fork 0

Fix a use after free in RestAqlHandler.

This commit is contained in:
Max Neunhoeffer 2014-10-30 14:58:34 +01:00
parent 4503d7a982
commit e74e3ac8db
1 changed files with 1 additions and 1 deletions

View File

@ -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!");