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

Commit 63079e7c authored by Dongwon Kang's avatar Dongwon Kang
Browse files

Fix memory leak in OggExtractor

Test: added a temporal log and run poc
Bug: 63581671
Change-Id: I436a08e54d5e831f9fbdb33c26d15397ce1fbeba
parent 2b1df000
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -575,6 +575,10 @@ status_t MyOpusExtractor::readNextPacket(MediaBuffer **out) {
            }
            // First two pages are header pages.
            if (err == ERROR_END_OF_STREAM || mCurrentPage.mPageNo > 2) {
                if (mBuf != NULL) {
                    mBuf->release();
                    mBuf = NULL;
                }
                break;
            }
            curGranulePosition = mCurrentPage.mGranulePosition;