diff options
author | Zachary Blair <zack_blair@hotmail.com> | 2010-06-27 20:38:16 (GMT) |
---|---|---|
committer | Andreas Kling <andreas.kling@nokia.com> | 2010-06-27 20:38:24 (GMT) |
commit | 9acf20771b624132833b2ca1e8bc421f69774f1e (patch) | |
tree | 2dac345e7f7b730609341bb4f15f61a362bea8c0 /src/multimedia | |
parent | 211d51adae4d3914544c6b3f82caf66a99af03ec (diff) | |
download | Qt-9acf20771b624132833b2ca1e8bc421f69774f1e.zip Qt-9acf20771b624132833b2ca1e8bc421f69774f1e.tar.gz Qt-9acf20771b624132833b2ca1e8bc421f69774f1e.tar.bz2 |
Fix suspicious code found by static code analysis:
* Missing break in switch
* delete instead of delete[]
* Null-pointer check after dereference
Merge-request: 716
Reviewed-by: Andreas Kling <andreas.kling@nokia.com>
Diffstat (limited to 'src/multimedia')
-rw-r--r-- | src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp index ecd03e5..19f3b3c 100644 --- a/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp +++ b/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp @@ -127,7 +127,7 @@ QAudioFormat QAudioDeviceInfoInternal::preferredFormat() const } } - delete streams; + delete[] streams; } } @@ -201,7 +201,7 @@ QList<int> QAudioDeviceInfoInternal::frequencyList() rc << vr[i].mMaximum; } - delete vr; + delete[] vr; } } @@ -345,7 +345,7 @@ QList<QByteArray> QAudioDeviceInfoInternal::availableDevices(QAudio::Mode mode) } } - delete audioDevices; + delete[] audioDevices; } } |