aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/radioBuffer.cpp
diff options
context:
space:
mode:
authorpierre.baudry <pierre.baudry@diateam.net>2016-10-20 16:30:51 +0200
committerpierre.baudry <pierre.baudry@diateam.net>2016-10-26 08:54:13 +0200
commit9436fbbf3ca0dca427c7cb8792d48dc6db34c55a (patch)
tree484fe71bb388a5c5e5bd1c1b82939b01dd7e5cae /Transceiver52M/radioBuffer.cpp
parent93ca09ea61d044e5f8662b28bf084c808cac4f2c (diff)
transceiver: Fix mismatched allocations and deallocations
The behaviour of a mismatched pair of allocation and deallocation is undefined Also fixes a memory leak if malloc fails (which stops the application anyway) Change-Id: I9c8bbade8531e8c9c02dcd43bac38cb954b3c89f
Diffstat (limited to 'Transceiver52M/radioBuffer.cpp')
-rw-r--r--Transceiver52M/radioBuffer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Transceiver52M/radioBuffer.cpp b/Transceiver52M/radioBuffer.cpp
index 9e6f079..a2b42c4 100644
--- a/Transceiver52M/radioBuffer.cpp
+++ b/Transceiver52M/radioBuffer.cpp
@@ -47,7 +47,7 @@ RadioBuffer::RadioBuffer(size_t numSegments, size_t segmentLen,
RadioBuffer::~RadioBuffer()
{
- delete buffer;
+ delete[] buffer;
}
void RadioBuffer::reset()