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

Commit bdc0f0f0 authored by Lajos Molnar's avatar Lajos Molnar
Browse files

OMXNodeInstance: use a lock around OMX::freeNode

This is to avoid a concurrent use after free if other OMX commands
are being executed before the node is marked as deleted.

Bug: 63666573
Change-Id: I7720dd900bfa252f8675e0c56191adbf52aa957e
parent 2999d359
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -495,6 +495,9 @@ status_t OMXNodeInstance::freeNode() {
            LOG_ALWAYS_FATAL("unknown state %s(%#x).", asString(state), state);
            break;
    }

    Mutex::Autolock _l(mLock);

    status_t err = mOwner->freeNode(this);

    mDispatcher.clear();