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

Commit 8adc8086 authored by Yunlian Jiang's avatar Yunlian Jiang
Browse files

Fix a clang-analyzer-cplusplus.NewDelete warning.

This fixes warning: Argument to 'delete' is the address of the local
variable 'inBuffer', which is not memory allocated by 'new'
[clang-analyzer-cplusplus.NewDelete]

Bug: none
Test: The warning is gone.
Change-Id: I6c954a679ba22e0d7859caaafce24f4e50b0391d
parent 000896fc
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1336,7 +1336,9 @@ bool AudioFlinger::PlaybackThread::OutputTrack::write(void* data, uint32_t frame
            if (mBufferQueue.size()) {
                mBufferQueue.removeAt(0);
                free(pInBuffer->mBuffer);
                if (pInBuffer != &inBuffer) {
                    delete pInBuffer;
                }
                ALOGV("OutputTrack::write() %p thread %p released overflow buffer %zu", this,
                        mThread.unsafe_get(), mBufferQueue.size());
            } else {