diff options
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/BlockFactory.cpp | 1 | ||||
-rw-r--r-- | src/server/LV2Block.cpp | 2 | ||||
-rw-r--r-- | src/server/PostProcessor.cpp | 10 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/server/BlockFactory.cpp b/src/server/BlockFactory.cpp index 76bc5f4b..c492d117 100644 --- a/src/server/BlockFactory.cpp +++ b/src/server/BlockFactory.cpp @@ -150,6 +150,7 @@ BlockFactory::load_lv2_plugins() break; } } + lilv_nodes_free(features); if (!supported) { continue; } diff --git a/src/server/LV2Block.cpp b/src/server/LV2Block.cpp index ab46e069..952b1d7e 100644 --- a/src/server/LV2Block.cpp +++ b/src/server/LV2Block.cpp @@ -165,6 +165,8 @@ LV2Block::prepare_poly(BufferFactory& bufs, uint32_t poly) for (uint32_t i = _polyphony; i < _prepared_instances->size(); ++i) { SPtr<LilvInstance> inst = make_instance(bufs.uris(), rate, i, true); if (!inst) { + delete _prepared_instances; + _prepared_instances = NULL; return false; } diff --git a/src/server/PostProcessor.cpp b/src/server/PostProcessor.cpp index b16aca2a..1ba17450 100644 --- a/src/server/PostProcessor.cpp +++ b/src/server/PostProcessor.cpp @@ -45,6 +45,14 @@ PostProcessor::PostProcessor(Engine& engine) PostProcessor::~PostProcessor() { + /* Delete any straggler events (usually at least one since the event list + is never completely emptied by process()). */ + Event* e = _head; + while (e) { + Event* const next = e->next(); + delete e; + e = next; + } } void @@ -74,7 +82,7 @@ PostProcessor::process() would cause a race with append. Instead, head is an already post-processed node, or initially a sentinel. */ Event* ev = _head.load(); - Event* next = (Event*)ev->next(); + Event* next = ev->next(); if (!next || next->time() >= end_time) { // Process audio thread notifications until end _engine.process_context().emit_notifications(end_time); |