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

Commit aecfb4f3 authored by George Burgess IV's avatar George Burgess IV Committed by android-build-merger
Browse files

Merge "Fix a memory leak" am: 9d05a115 am: 4db88a09

am: 79ca6d24

Change-Id: I5c0f9dd1258d2f45dc8015e3be29d5a70eb9ff8e
parents b1410279 79ca6d24
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -107,6 +107,7 @@ OSCL_EXPORT_REF Bool PVInitVideoDecoder(VideoDecControls *decCtrl, uint8 *volbuf
#else
        if ((size_t)nLayers > SIZE_MAX / sizeof(Vol *)) {
            status = PV_FALSE;
            oscl_free(video);
            goto fail;
        }

@@ -115,7 +116,8 @@ OSCL_EXPORT_REF Bool PVInitVideoDecoder(VideoDecControls *decCtrl, uint8 *volbuf
        if (video->vol == NULL) status = PV_FALSE;
        video->memoryUsage += nLayers * sizeof(Vol *);


        /* be sure not to leak any previous state */
        PVCleanUpVideoDecoder(decCtrl);
        /* we need to setup this pointer for the application to */
        /*    pass it around.                                   */
        decCtrl->videoDecoderData = (void *) video;