diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsource.cpp b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsource.cpp index 3a1b9a67a..7509d2396 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsource.cpp +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsource.cpp @@ -53,7 +53,7 @@ IEEE_802_15_4_ModSource::IEEE_802_15_4_ModSource() : IEEE_802_15_4_ModSource::~IEEE_802_15_4_ModSource() { - delete m_sinLUT; + delete[] m_sinLUT; } void IEEE_802_15_4_ModSource::pull(SampleVector::iterator begin, unsigned int nbSamples) @@ -406,8 +406,7 @@ void IEEE_802_15_4_ModSource::createHalfSine(int sampleRate, int chipRate) int samplesPerChip = sampleRate / chipRate; double tc = 1.0 / chipRate; - if (m_sinLUT) - delete m_sinLUT; + delete[] m_sinLUT; m_sinLUT = new double[2*samplesPerChip]; for (int i = 0; i < 2*samplesPerChip; i++) { diff --git a/plugins/channeltx/moddatv/dvb-s/dvb-s.cpp b/plugins/channeltx/moddatv/dvb-s/dvb-s.cpp index 03d6fac2b..c3307e831 100644 --- a/plugins/channeltx/moddatv/dvb-s/dvb-s.cpp +++ b/plugins/channeltx/moddatv/dvb-s/dvb-s.cpp @@ -47,13 +47,13 @@ DVBS::~DVBS() { // Free interleaver FIFO memory for (int i = 1; i < interleaveDepth; i++) - delete m_interleaveFIFO[i]; - delete m_interleaveIdx; - delete m_interleaveLen; - delete m_interleaveFIFO; + delete[] m_interleaveFIFO[i]; + delete[] m_interleaveIdx; + delete[] m_interleaveLen; + delete[] m_interleaveFIFO; // Free packet buffer - delete m_packet; + delete[] m_packet; } // Scramble input packet (except for sync bytes) with psuedo random binary sequence