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

Commit 1238007f authored by Wonsik Kim's avatar Wonsik Kim
Browse files

CCodec: fix nullptr deref at initiateReleaseIfStuck

Bug: 187320018
Test: Treehugger
Change-Id: I489bd8fb28fac7a4165933e536ea4bba11898236
parent c5dd9f43
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -2400,6 +2400,11 @@ void CCodec::initiateReleaseIfStuck() {
    C2String compName;
    C2String compName;
    {
    {
        Mutexed<State>::Locked state(mState);
        Mutexed<State>::Locked state(mState);
        if (!state->comp) {
            ALOGD("previous call to %s exceeded timeout "
                  "and the component is already released", name.c_str());
            return;
        }
        compName = state->comp->getName();
        compName = state->comp->getName();
    }
    }
    ALOGW("[%s] previous call to %s exceeded timeout", compName.c_str(), name.c_str());
    ALOGW("[%s] previous call to %s exceeded timeout", compName.c_str(), name.c_str());