summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorEmilian Peev <epeev@google.com>2017-02-13 15:26:00 +0000
committerEmilian Peev <epeev@google.com>2017-02-14 09:30:35 +0000
commitbbdb1f6f5d7be1378395299c77d088b735e47edb (patch)
treedf85322fec738aa3a5a974f89982d36c8a065ad3 /camera
parent60536d8e9f63f070e2d1269374ddb8f61cd78b23 (diff)
downloadplatform_hardware_interfaces-bbdb1f6f5d7be1378395299c77d088b735e47edb.tar.gz
platform_hardware_interfaces-bbdb1f6f5d7be1378395299c77d088b735e47edb.tar.bz2
platform_hardware_interfaces-bbdb1f6f5d7be1378395299c77d088b735e47edb.zip
Camera: Fix ION buffer leaks
Native buffer handles should always get closed and deleted during buffer release. BUG: 35338606 Test: Manual using application Change-Id: I5d7a4b02a28b29b872b66843d623166f04207c2e
Diffstat (limited to 'camera')
-rw-r--r--camera/device/3.2/default/CameraDeviceSession.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/camera/device/3.2/default/CameraDeviceSession.cpp b/camera/device/3.2/default/CameraDeviceSession.cpp
index b47a220db0..76310ef633 100644
--- a/camera/device/3.2/default/CameraDeviceSession.cpp
+++ b/camera/device/3.2/default/CameraDeviceSession.cpp
@@ -194,9 +194,9 @@ private:
mRelease(mDevice, handle);
} else {
mModule->unregisterBuffer(mModule, handle);
- native_handle_close(handle);
- native_handle_delete(const_cast<native_handle_t*>(handle));
}
+ native_handle_close(handle);
+ native_handle_delete(const_cast<native_handle_t*>(handle));
}
// gralloc1