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

Commit a80252eb authored by Wonsik Kim's avatar Wonsik Kim Committed by android-build-merger
Browse files

omx: prevent crash at MuxOMX::freeNode for already freed nodes am: 6fb1ff39 am: b6f4a667

am: 9625f09c

Change-Id: I4da2417d724fc9bce0de7f1fb02fe4f1fd951c7a
parents 8b802199 9625f09c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -311,6 +311,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) {