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

Commit bf432cce authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "camera: fix two potential null pointer uses"

parents ad51fe22 2ea14880
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
    {