diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/World.cpp | 1 | ||||
-rw-r--r-- | src/server/BlockFactory.cpp | 1 | ||||
-rw-r--r-- | src/server/LV2Block.cpp | 2 | ||||
-rw-r--r-- | src/server/PostProcessor.cpp | 10 | ||||
-rw-r--r-- | src/socket/SocketReader.cpp | 1 |
5 files changed, 14 insertions, 1 deletions
diff --git a/src/World.cpp b/src/World.cpp index 38f9c4cc..5b7214a4 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -150,6 +150,7 @@ public: const LilvNode* internal = lilv_nodes_get(internals, i); lilv_world_load_resource(lilv_world, internal); } + lilv_nodes_free(internals); lilv_node_free(rdf_type); lilv_node_free(ingen_Plugin); } 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); diff --git a/src/socket/SocketReader.cpp b/src/socket/SocketReader.cpp index b69ae92f..7e1a9e91 100644 --- a/src/socket/SocketReader.cpp +++ b/src/socket/SocketReader.cpp @@ -182,6 +182,7 @@ SocketReader::run() sratom_free(sratom); serd_reader_free(reader); sord_free(model); + free((uint8_t*)chunk.buf); _socket.reset(); } |