commit | e8322b5584596350b2bb7ccffacd9af8ffe8194c | [log] [tgz] |
---|---|---|
author | zhangshuxiao <zhangshuxiao@xiaomi.com> | Tue Dec 18 19:27:28 2018 +0800 |
committer | Shuzhen Wang <shuzhenwang@google.com> | Mon Apr 22 14:36:53 2019 -0700 |
tree | 56e5f19d53c9159f630b0dbc8094b5f3924741c8 | |
parent | 3208826f676b1be78e1c04692d7f17249e45c3ea [diff] [blame] |
Camera: The vector memory is freed after clear The clear function of vector will release memory, so mBins will use overflow. Test: enable asan for cameraserver Bug: 131103281 Change-Id: Iaaa353332d7ac3992f018aa667fb8ef20a810f20 Signed-off-by: zhangshuxiao <zhangshuxiao@xiaomi.com>
diff --git a/services/camera/libcameraservice/utils/LatencyHistogram.cpp b/services/camera/libcameraservice/utils/LatencyHistogram.cpp index 538bb6e..e2bdc43 100644 --- a/services/camera/libcameraservice/utils/LatencyHistogram.cpp +++ b/services/camera/libcameraservice/utils/LatencyHistogram.cpp
@@ -46,7 +46,7 @@ } void CameraLatencyHistogram::reset() { - mBins.clear(); + memset(mBins.data(), 0, mBins.size() * sizeof(int64_t)); mTotalCount = 0; }