Skip to content

Commit

Permalink
Max buffer references weren't being freed safely (ASan) (flucoma#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
weefuzzy authored Feb 14, 2022
1 parent 1ec59ff commit 43ac03b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/include/MaxBufferAdaptor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ class MaxBufferAdaptor : public BufferAdaptor
// ;
lock();
release();
if (mBufref) object_free(mBufref);
t_buffer_ref* tmp{nullptr};
using std::swap;
swap(tmp,mBufref);
if (tmp) object_free(tmp);
}

MaxBufferAdaptor(const MaxBufferAdaptor&) = delete;
Expand Down

0 comments on commit 43ac03b

Please sign in to comment.