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

Commit 12586d1c authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Fix memory leaks

Bug: 64424279
Change-Id: I814f81d8e050132be7779310d3f1ab6b19f2e593
parent 0d7d0ab1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4014,6 +4014,8 @@ status_t MPEG4Source::read(
        }
        if (size > mBuffer->size()) {
            ALOGE("buffer too small: %zu > %zu", size, mBuffer->size());
            mBuffer->release();
            mBuffer = NULL;
            return ERROR_BUFFER_TOO_SMALL;
        }
    }
@@ -4300,6 +4302,8 @@ status_t MPEG4Source::fragmentedRead(
        }
        if (size > mBuffer->size()) {
            ALOGE("buffer too small: %zu > %zu", size, mBuffer->size());
            mBuffer->release();
            mBuffer = NULL;
            return ERROR_BUFFER_TOO_SMALL;
        }
    }