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

Commit 504f1761 authored by Chong Zhang's avatar Chong Zhang Committed by Android (Google) Code Review
Browse files

Merge "Fix potential null ptr after low memory" into sc-dev

parents 81edbe64 aa979c7c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ sp<IMemory> allocVideoFrame(const sp<MetaData>& trackMeta,
        return NULL;
    }
    sp<IMemory> frameMem = new MemoryBase(heap, 0, size);
    if (frameMem == NULL) {
    if (frameMem == NULL || frameMem->unsecurePointer() == NULL) {
        ALOGE("not enough memory for VideoFrame size=%zu", size);
        return NULL;
    }