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

Commit aaa27556 authored by Ray Essick's avatar Ray Essick
Browse files

Fix memory leak in metrics handling during error

Bug: 271279427
Test: build
Change-Id: If4725906a3326375b6a7f7f0b9d5fe32a0c64ed3
parent 934297de
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1909,6 +1909,7 @@ status_t MediaCodec::configure(
        if (mWidth < 0 || mHeight < 0 ||
               (uint64_t)mWidth * mHeight > (uint64_t)INT32_MAX / 4) {
            ALOGE("Invalid size(s), width=%d, height=%d", mWidth, mHeight);
            mediametrics_delete(nextMetricsHandle);
            return BAD_VALUE;
        }