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

Commit b01d8f7d authored by Yunlian Jiang's avatar Yunlian Jiang
Browse files

Fix warning: Potential leak of memory pointed to by 'device'

This fixes the waring: Potential leak of memory pointed to by 'device'

Change-Id: I7e80c36ef4a66bb0e9febef7941c87eb4a083110
Test: The warning is gone.
parent ce9db56c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -475,6 +475,7 @@ ACameraManager::openCamera(
    sp<hardware::ICameraService> cs = CameraManagerGlobal::getInstance().getCameraService();
    if (cs == nullptr) {
        ALOGE("%s: Cannot reach camera service!", __FUNCTION__);
        delete device;
        return ACAMERA_ERROR_CAMERA_DISCONNECTED;
    }