diff options
| author | 2016-03-02 10:30:23 -0800 | |
|---|---|---|
| committer | 2016-03-02 10:47:20 -0800 | |
| commit | 5b83050affa6a3b1d3863c0b903f9d48fe4aefb2 (patch) | |
| tree | 6ffce3adefced9b6ab9f019327e542e0535e225e /runtime/stack.cc | |
| parent | a71ec6419d9e80b354de721003c8b7929d224a49 (diff) | |
Fix potential linear alloc memory leak
Previously, if we created a linear alloc for a class loader but
never created the class table, the linear alloc would never get
freed since it would have no corresponding ClassLoaderData.
Fixes valgrind-test-art-host-gtest-oat_test
Bug: 27384882
Change-Id: Ic8f35b58c3117127a39521b6b9d25ef12c72040c
Diffstat (limited to 'runtime/stack.cc')
| -rw-r--r-- | runtime/stack.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/stack.cc b/runtime/stack.cc index b1f1ed61b4..ee5da8e150 100644 --- a/runtime/stack.cc +++ b/runtime/stack.cc @@ -739,7 +739,7 @@ void StackVisitor::SanityCheckFrame() const { // Check class linker linear allocs. mirror::Class* klass = method->GetDeclaringClass(); LinearAlloc* const class_linear_alloc = (klass != nullptr) - ? ClassLinker::GetAllocatorForClassLoader(klass->GetClassLoader()) + ? runtime->GetClassLinker()->GetAllocatorForClassLoader(klass->GetClassLoader()) : linear_alloc; if (!class_linear_alloc->Contains(method)) { // Check image space. |