From eb144bbbd0b18427562b0d7db5b38e11f9484739 Mon Sep 17 00:00:00 2001 From: "Andrei V. FOMITCHEV" Date: Tue, 9 Oct 2012 11:33:25 +0200 Subject: 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 Signed-off-by: David Wagner Signed-off-by: Jack Ren Signed-off-by: Bruce Beare --- services/audioflinger/Threads.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'services') 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; -- cgit v1.1