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

Commit 6fb1ff39 authored by Wonsik Kim's avatar Wonsik Kim
Browse files

omx: prevent crash at MuxOMX::freeNode for already freed nodes

Bug: 29188904
Change-Id: I5c11ad371d6a060c4b201492aac08a8163d1b658
parent 15223ec2
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -303,6 +303,12 @@ status_t MuxOMX::allocateNode(
status_t MuxOMX::freeNode(node_id node) {
    Mutex::Autolock autoLock(mLock);

    // exit if we have already freed the node
    if (mNodeLocation.indexOfKey(node) < 0) {
        ALOGD("MuxOMX::freeNode: node %d seems to be released already --- ignoring.", node);
        return OK;
    }

    status_t err = getOMX_l(node)->freeNode(node);

    if (err != OK) {