mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "camera: fix two potential null pointer uses"
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