Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8322b55 authored by zhangshuxiao's avatar zhangshuxiao Committed by Shuzhen Wang
Browse files

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: default avatarzhangshuxiao <zhangshuxiao@xiaomi.com>
parent 3208826f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ void CameraLatencyHistogram::add(nsecs_t start, nsecs_t end) {
}

void CameraLatencyHistogram::reset() {
    mBins.clear();
    memset(mBins.data(), 0, mBins.size() * sizeof(int64_t));
    mTotalCount = 0;
}