summaryrefslogtreecommitdiffstats
path: root/src/plugin.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-04-23 18:17:15 +0000
committerDavid Robillard <d@drobilla.net>2007-04-23 18:17:15 +0000
commiteda602d83c1a28f6a1654811affb00c78d25c8bf (patch)
tree02ac74cae8ada704afee766d9fa0018688b74324 /src/plugin.c
parent2a5e35c295d2df30e98cacb48ec3496a85c2d851 (diff)
downloadlilv-eda602d83c1a28f6a1654811affb00c78d25c8bf.tar.gz
lilv-eda602d83c1a28f6a1654811affb00c78d25c8bf.tar.bz2
lilv-eda602d83c1a28f6a1654811affb00c78d25c8bf.zip
Incorporated patch from larsl for reading plugin manifest files for plugin data.
Plugged several memory leaks. git-svn-id: http://svn.drobilla.net/lad/slv2@474 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/plugin.c')
-rw-r--r--src/plugin.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/plugin.c b/src/plugin.c
index a3f9177..7efe6b7 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -162,6 +162,8 @@ slv2_plugin_load(SLV2Plugin p)
SLV2PluginClass plugin_class = slv2_plugin_classes_get_by_uri(
p->world->plugin_classes, class_uri_str);
+
+ librdf_free_node(class_node);
if (plugin_class) {
p->plugin_class = plugin_class;
@@ -173,6 +175,9 @@ slv2_plugin_load(SLV2Plugin p)
if (p->plugin_class == NULL)
p->plugin_class = raptor_sequence_get_at(p->world->plugin_classes, 0); // lv2:Plugin
+
+ librdf_free_query_results(results);
+ librdf_free_query(q);
// Load ports
query = (const unsigned char*)
@@ -216,9 +221,7 @@ slv2_plugin_load(SLV2Plugin p)
raptor_sequence_sort(p->ports, slv2_port_compare_by_index);
- if (results)
- librdf_free_query_results(results);
-
+ librdf_free_query_results(results);
librdf_free_query(q);
//printf("%p %s: NUM PORTS: %d\n", (void*)p, p->plugin_uri, slv2_plugin_get_num_ports(p));