diff options
author | Florian Walpen <dev@submerge.ch> | 2022-01-22 22:12:47 +0100 |
---|---|---|
committer | Filipe Coelho <falktx@falktx.com> | 2022-04-07 15:20:45 +0100 |
commit | d8f59c2f804ef29e0db772a3bffda219514ab1c3 (patch) | |
tree | 709d10c9af55c730a5e9590a4823530833f293bd | |
parent | 58194d90f4321e0a8a0fbc5708a637e13f77159a (diff) | |
download | jack2-d8f59c2f804ef29e0db772a3bffda219514ab1c3.tar.gz |
Fix bad deallocation in JackMidiAsyncQueue.
The code is only run when other allocations fail, fix it anyway.
This was found by llvm scan-build.
-rw-r--r-- | common/JackMidiAsyncQueue.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/JackMidiAsyncQueue.cpp b/common/JackMidiAsyncQueue.cpp index ab64db3f..00ca2839 100644 --- a/common/JackMidiAsyncQueue.cpp +++ b/common/JackMidiAsyncQueue.cpp @@ -38,7 +38,7 @@ JackMidiAsyncQueue::JackMidiAsyncQueue(size_t max_bytes, size_t max_messages) } jack_ringbuffer_free(byte_ring); } - delete data_buffer; + delete[] data_buffer; throw std::bad_alloc(); } |