mirror of https://gitee.com/bigwinds/arangodb
Fixed potential memleaks in failure cases
This commit is contained in:
parent
368eeb95b3
commit
17a45c8cd3
|
@ -2068,10 +2068,10 @@ int triagens::aql::useIndexesRule (Optimizer* opt,
|
||||||
try {
|
try {
|
||||||
if (changes.size() > 0) {
|
if (changes.size() > 0) {
|
||||||
modified = true;
|
modified = true;
|
||||||
for (auto& change : changes) {
|
for (auto change = changes.cbegin(); change != changes.cend() ; ++change) {
|
||||||
plan->registerNode(change.second);
|
plan->registerNode(change->second);
|
||||||
plan->replaceNode(plan->getNodeById(change.first), change.second);
|
plan->replaceNode(plan->getNodeById(change->first), change->second);
|
||||||
// TODO properly clear changes!
|
changes.erase(change);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue