summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorDyami Caliri <dyami@dragonframe.com>2014-03-27 09:29:38 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-27 18:01:09 +0100
commit5c09bba97942bad4862644a9589bd62f6e6aa2d7 (patch)
tree170f548f6691683b74a2f74393b4563889b65029 /src/plugins
parentccce4e3da24653f8ebd5f32f969cd67e875a22e1 (diff)
downloadqtmultimedia-5c09bba97942bad4862644a9589bd62f6e6aa2d7.tar.gz
CoreAudio: Mismatched new[]/delete in several places.
The CoreAudio plugin code in QtMultimedia had several different places where an array was allocated with "new[]" and deleted with "delete". Fixed by deleting with "delete[]". Task-number: QTBUG-37861 Change-Id: Id85bc07a054ad161b0403cc0fe5c56ec5b41d4e3 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/coreaudio/coreaudiodeviceinfo.mm6
-rw-r--r--src/plugins/coreaudio/coreaudioutils.mm2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/coreaudio/coreaudiodeviceinfo.mm b/src/plugins/coreaudio/coreaudiodeviceinfo.mm
index 74a692c10..56765cafd 100644
--- a/src/plugins/coreaudio/coreaudiodeviceinfo.mm
+++ b/src/plugins/coreaudio/coreaudiodeviceinfo.mm
@@ -110,7 +110,7 @@ QAudioFormat CoreAudioDeviceInfo::preferredFormat() const
}
}
- delete streams;
+ delete[] streams;
}
}
#else //iOS
@@ -180,7 +180,7 @@ QList<int> CoreAudioDeviceInfo::supportedSampleRates()
}
}
- delete vr;
+ delete[] vr;
}
}
#else //iOS
@@ -380,7 +380,7 @@ QList<QByteArray> CoreAudioDeviceInfo::availableDevices(QAudio::Mode mode)
}
}
- delete audioDevices;
+ delete[] audioDevices;
}
}
#else //iOS
diff --git a/src/plugins/coreaudio/coreaudioutils.mm b/src/plugins/coreaudio/coreaudioutils.mm
index d43303a1d..e626561d1 100644
--- a/src/plugins/coreaudio/coreaudioutils.mm
+++ b/src/plugins/coreaudio/coreaudioutils.mm
@@ -125,7 +125,7 @@ CoreAudioRingBuffer::CoreAudioRingBuffer(int bufferSize):
CoreAudioRingBuffer::~CoreAudioRingBuffer()
{
- delete m_buffer;
+ delete[] m_buffer;
}
CoreAudioRingBuffer::Region CoreAudioRingBuffer::acquireReadRegion(int size)