OSDN Git Service

Fix potential linear alloc memory leak
authorMathieu Chartier <mathieuc@google.com>
Wed, 2 Mar 2016 18:30:23 +0000 (10:30 -0800)
committerMathieu Chartier <mathieuc@google.com>
Sat, 5 Mar 2016 00:06:45 +0000 (16:06 -0800)
commitf28a99a90b68e45f39191258832e7a526c4742ba
treef9c23c99487a17d435f0f7cf4e94f78cc6ddd409
parent88027bd6810b9a5b785dba5396eec5301e4540b2
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
Bug: 22858531

(cherry picked from commit 5b83050affa6a3b1d3863c0b903f9d48fe4aefb2)

Change-Id: I71b650eac4e33212a7f03c43141db99e635a19ad
runtime/class_linker.cc
runtime/class_linker.h
runtime/stack.cc