From a6af411af7ade161483ae688f5e1868d481a8fce Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 24 Feb 2016 23:36:15 +0100 Subject: [PATCH] potential mem corruption at session close: ARDOUR::Session::~Session() ARDOUR::Route::~Route() ARDOUR::InternalReturn::~InternalReturn() ARDOUR::Return::~Return() ARDOUR::Session::unmark_return_id(unsigned int) boost::dynamic_bitset >::reference::do_assign(bool) -> Invalid write of size 4 -> 0 bytes inside a block of size 4 free'd Thanks to The_CLA for valgrinding this. --- libs/ardour/session.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 3509ee19a5..d0fe74db21 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -5501,6 +5501,7 @@ Session::unmark_aux_send_id (uint32_t id) void Session::unmark_return_id (uint32_t id) { + if (_state_of_the_state & Deletion) { return; } if (id < return_bitset.size()) { return_bitset[id] = false; }