diff options
author | Shuzhen Wang <shuzhenw@codeaurora.org> | 2014-12-04 22:27:00 -0800 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2014-12-05 09:06:37 -0800 |
commit | 4dc1f8cec363906c5e3a5558cf66e0c65160c388 (patch) | |
tree | dd276fa6984faddd7fc31064438e020b3d193641 | |
parent | ecdb82be65723f89a60bccf2a5069041d83e8713 (diff) | |
download | mako-4dc1f8cec363906c5e3a5558cf66e0c65160c388.tar.gz |
camera: Fix memory leak in HDR mode
The hdr YUV buffer counter should be incremented for every YUV
callback received.
b/18429991 Camera: ~40 MB memory leak per capture on N4 when using HDR mode
Change-Id: If90c931ebc9e87984bbe4b1d6f7934fd7f5daab9
Signed-off-by: Iliyan Malchev <malchev@google.com>
-rwxr-xr-x | camera/QCameraHWI_Still.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/camera/QCameraHWI_Still.cpp b/camera/QCameraHWI_Still.cpp index 34d8765..d3fe706 100755 --- a/camera/QCameraHWI_Still.cpp +++ b/camera/QCameraHWI_Still.cpp @@ -2092,12 +2092,10 @@ status_t QCameraStream_Snapshot::receiveRawPicture(mm_camera_ch_data_buf_t* recv if(mHalCamCtrl->mHdrMode == HDR_MODE) { if ((hdrRawCount % 3) != 2) { + hdrRawCount++; mStopCallbackLock.unlock(); return NO_ERROR; } - else { - hdrRawCount++; - } } if (rc != NO_ERROR) |