mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Merge "camera: fix two potential null pointer uses"
am: bf432cced9
Change-Id: I25af16883f8b3e8e323e384a68509031c1bcf720
This commit is contained in:
@@ -397,9 +397,11 @@ void CameraDevice::sPutMemory(camera_memory_t *data) {
|
||||
CameraDevice* device = mem->handle.mDevice;
|
||||
if (device == nullptr) {
|
||||
ALOGE("%s: camera HAL return memory for a null device!", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
if (device->mDeviceCallback == nullptr) {
|
||||
ALOGE("%s: camera HAL return memory while camera is not opened!", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
device->mDeviceCallback->unregisterMemory(mem->handle.mId);
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user