diff options
author | pierre.baudry <pierre.baudry@diateam.net> | 2016-10-20 16:30:51 +0200 |
---|---|---|
committer | pierre.baudry <pierre.baudry@diateam.net> | 2016-10-26 08:54:13 +0200 |
commit | 9436fbbf3ca0dca427c7cb8792d48dc6db34c55a (patch) | |
tree | 484fe71bb388a5c5e5bd1c1b82939b01dd7e5cae /Transceiver52M/Resampler.cpp | |
parent | 93ca09ea61d044e5f8662b28bf084c808cac4f2c (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/Resampler.cpp')
-rw-r--r-- | Transceiver52M/Resampler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Transceiver52M/Resampler.cpp b/Transceiver52M/Resampler.cpp index 070adda..8a73b79 100644 --- a/Transceiver52M/Resampler.cpp +++ b/Transceiver52M/Resampler.cpp @@ -61,7 +61,7 @@ bool Resampler::initFilters(float bw) partitions = (float **) malloc(sizeof(float *) * p); if (!partitions) { - free(proto); + delete[] proto; return false; } |