guitarix/guitarix-mismatched-delete.patch

21 lines
602 B
Diff
Raw Normal View History

2022-05-13 22:18:38 +00:00
diff --git a/src/gx_head/engine/gx_resampler.cpp b/trunk/src/gx_head/engine/gx_resampler.cpp
index 38eaaec7..adbba7cc 100644
--- a/src/gx_head/engine/gx_resampler.cpp
+++ b/src/gx_head/engine/gx_resampler.cpp
@@ -121,13 +121,13 @@ float *BufferResampler::process(int fs_inp, int ilen, float *input, int fs_outp,
inp_data = input;
float *p = out_data = new float[out_count];
if (Resampler::process() != 0) {
- delete p;
+ delete[] p;
return 0;
}
inp_data = 0;
inp_count = k/2;
if (Resampler::process() != 0) {
- delete p;
+ delete[] p;
return 0;
}
assert(inp_count == 0);