summaryrefslogtreecommitdiff
path: root/runtime/monitor_pool.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2016-03-03 20:15:47 -0800
committer Andreas Gampe <agampe@google.com> 2016-03-03 20:15:47 -0800
commit4464a3efcf8dcddfb00d7db0c3add9a7acb6642e (patch)
tree6200ef3fb4796254224dcc3df37aa7986cf269f8 /runtime/monitor_pool.cc
parent4a01be2b1a7de5ce68cb5a453eb7cb4fc6c6658b (diff)
ART: Fix UTF test and monitor pool old chunks
Zero-initialize buffers in utf_test. UTF conversion does not append a zero terminator, but the test uses strlen to check the byte count. Move to unique_ptr for storing old monitor-pool chunk data to fix a leak. Bug: 27156726 Change-Id: I14424c6f98cf47beab6243f83a335bd6a682c638
Diffstat (limited to 'runtime/monitor_pool.cc')
-rw-r--r--runtime/monitor_pool.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/monitor_pool.cc b/runtime/monitor_pool.cc
index 2832e32dd1..9e78cda190 100644
--- a/runtime/monitor_pool.cc
+++ b/runtime/monitor_pool.cc
@@ -51,7 +51,7 @@ void MonitorPool::AllocateChunk() {
memcpy(new_backing, old_backing, sizeof(uintptr_t) * capacity_);
monitor_chunks_.StoreRelaxed(new_backing);
capacity_ = new_capacity;
- old_chunk_arrays_.push_back(old_backing);
+ old_chunk_arrays_.push_back(std::unique_ptr<uintptr_t[]>(old_backing));
VLOG(monitor) << "Resizing to capacity " << capacity_;
}
}