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

Commit 8b6e1e03 authored by Robert Shih's avatar Robert Shih Committed by Gerrit Code Review
Browse files

OMXCodec: check IMemory::pointer() before using allocation

CYNGNOS-3235
Bug: 29421811
Change-Id: I0a73ba12bae4122f1d89fc92e5ea4f6a96cd1ed1
(cherry picked from commit 2a14baea)
parent 0549dc85
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2108,7 +2108,9 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) {

    for (OMX_U32 i = 0; i < def.nBufferCountActual; ++i) {
        sp<IMemory> mem = mDealer[portIndex]->allocate(def.nBufferSize);
        CHECK(mem.get() != NULL);
        if (mem == NULL || mem->pointer() == NULL) {
            return NO_MEMORY;
        }

        BufferInfo info;
        info.mData = NULL;