Linkgraph: Use an arena allocator for path objects.

Fixes leaks when job is aborted early.
This commit is contained in:
Jonathan G Rennison
2017-02-08 21:46:32 +00:00
parent a67ecb4f6e
commit c86a027e88
3 changed files with 11 additions and 8 deletions

View File

@@ -60,10 +60,7 @@ void FlowMapper::Run(LinkGraphJob &job) const
}
}
/* Clear paths. */
PathList &paths = node.Paths();
for (PathList::iterator i = paths.begin(); i != paths.end(); ++i) {
delete *i;
}
paths.clear();
node.Paths().clear();
}
job.path_allocator.ResetArena();
}