summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorAndrei V. FOMITCHEV <andreix.fomitchev@intel.com>2012-10-09 11:33:25 +0200
committerDavid Wagner <david.wagner@intel.com>2013-07-30 14:42:08 +0200
commiteb144bbbd0b18427562b0d7db5b38e11f9484739 (patch)
treec9ca9b64b648eef884e088f55c3693c0ddbc9c40 /services
parent1bb59258458350af518170558120783bc2f9e61d (diff)
downloadframeworks_av-eb144bbbd0b18427562b0d7db5b38e11f9484739.zip
frameworks_av-eb144bbbd0b18427562b0d7db5b38e11f9484739.tar.gz
frameworks_av-eb144bbbd0b18427562b0d7db5b38e11f9484739.tar.bz2
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: Andrei V. FOMITCHEV <andreix.fomitchev@intel.com> Signed-off-by: David Wagner <david.wagner@intel.com> Signed-off-by: Jack Ren <jack.ren@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/Threads.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 97f66f4..0b88c0e 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -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;