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

Commit eb144bbb authored by Andrei V. FOMITCHEV's avatar Andrei V. FOMITCHEV Committed by David Wagner
Browse files

Fix mismatched delete/new couple



In RecordThread::readInputParameters(), mRsmpInBuffer is allocated
with new[] and should be freed with delete[] instead of delete.

This error has been found by valgrind.

Change-Id: I2f947abb658a21a7d1e61eebb99270cb37d2d147
Signed-off-by: default avatarAndrei V. FOMITCHEV <andreix.fomitchev@intel.com>
Signed-off-by: default avatarDavid Wagner <david.wagner@intel.com>
Signed-off-by: default avatarJack Ren <jack.ren@intel.com>
Signed-off-by: default avatarBruce Beare <bruce.j.beare@intel.com>
parent 1bb59258
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4327,9 +4327,9 @@ void AudioFlinger::RecordThread::audioConfigChanged_l(int event, int param) {

void AudioFlinger::RecordThread::readInputParameters()
{
    delete mRsmpInBuffer;
    delete[] mRsmpInBuffer;
    // mRsmpInBuffer is always assigned a new[] below
    delete mRsmpOutBuffer;
    delete[] mRsmpOutBuffer;
    mRsmpOutBuffer = NULL;
    delete mResampler;
    mResampler = NULL;