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

Commit a0721999 authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Fix potential leak

Fix potential memory leak introduced with bugfix for bug 31449945.

Bug: 36389123
Change-Id: I5a9a3551692d6cba385b45c4c7a465aa377a62b1
parent c5bea960
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2637,8 +2637,10 @@ status_t MPEG4Extractor::parseITunesMetaData(off64_t offset, size_t size) {
                    int32_t delay, padding;
                    if (sscanf(mLastCommentData,
                               " %*x %x %x %*x", &delay, &padding) == 2) {
                        if (mLastTrack == NULL)
                        if (mLastTrack == NULL) {
                            delete[] buffer;
                            return ERROR_MALFORMED;
                        }

                        mLastTrack->meta->setInt32(kKeyEncoderDelay, delay);
                        mLastTrack->meta->setInt32(kKeyEncoderPadding, padding);