Skip to content
Snippets Groups Projects
Commit ea33d4bf authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #6627: zero-initialize pointers if they're going to be deleted

parent c7746837
Branches
Tags
No related merge requests found
...@@ -52,6 +52,7 @@ AlsaLayer::AlsaLayer (ManagerImpl* manager) ...@@ -52,6 +52,7 @@ AlsaLayer::AlsaLayer (ManagerImpl* manager)
, _is_open_capture (false) , _is_open_capture (false)
, _trigger_request (false) , _trigger_request (false)
, _audioThread (NULL) , _audioThread (NULL)
, _converter (0)
{ {
_debug ("Audio: Build ALSA layer"); _debug ("Audio: Build ALSA layer");
...@@ -132,7 +133,7 @@ AlsaLayer::openDevice (int indexIn, int indexOut, int indexRing, int sampleRate, ...@@ -132,7 +133,7 @@ AlsaLayer::openDevice (int indexIn, int indexOut, int indexRing, int sampleRate,
_converter = new SamplerateConverter (_audioSampleRate); _converter = new SamplerateConverter (_audioSampleRate);
AudioLayer::_dcblocker = new DcBlocker(); AudioLayer::_dcblocker = new DcBlocker();
AudioLayer::_audiofilter = new AudioProcessing (static_cast<Algorithm *> (_dcblocker)); AudioLayer::_audiofilter = new AudioProcessing (_dcblocker);
} }
void void
......
...@@ -82,6 +82,8 @@ class AudioLayer ...@@ -82,6 +82,8 @@ class AudioLayer
, _outChannel (1) , _outChannel (1)
, _errorMessage (0) , _errorMessage (0)
, _mutex () , _mutex ()
, _dcblocker(0)
, _audiofilter(0)
, _countNotificationTime(0) , _countNotificationTime(0)
, _time (new ost::Time()) { , _time (new ost::Time()) {
......
...@@ -237,6 +237,7 @@ PulseLayer::PulseLayer (ManagerImpl* manager) ...@@ -237,6 +237,7 @@ PulseLayer::PulseLayer (ManagerImpl* manager)
, playback (NULL) , playback (NULL)
, record (NULL) , record (NULL)
, ringtone (NULL) , ringtone (NULL)
, _converter(0)
{ {
_urgentRingBuffer.createReadPointer(); _urgentRingBuffer.createReadPointer();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment