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

Commit cbe0d94a authored by Gloria Wang's avatar Gloria Wang
Browse files

Duplicated fileDesc is not closed when input file is not forward-lock content.

Fix for bug 4606053.

Change-Id: I1b45457d8cdc75d268631911f46ce6ec931b1770
parent 26cfe80f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -455,11 +455,14 @@ status_t FwdLockEngine::onOpenDecryptSession(int uniqueId,
        } else {
            LOGD("FwdLockEngine::onOpenDecryptSession Integrity Check failed for the fd");
            FwdLockFile_detach(fileDesc);
            ::close(fileDesc);
            delete decodeSession;
        }
    }

    if (DRM_NO_ERROR != result && -1 < fileDesc) {
        ::close(fileDesc);
    }

    LOGD("FwdLockEngine::onOpenDecryptSession Exit. result = %d", result);

    return result;