summaryrefslogtreecommitdiffstats
path: root/src/plugin.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-06-03 21:06:07 +0000
committerDavid Robillard <d@drobilla.net>2009-06-03 21:06:07 +0000
commitc220a3ce918293855ed6b53b97dc604573fd031a (patch)
tree1d2bded722d47255d34e886493a9bf6ca5afc07f /src/plugin.c
parent150469fe73ff662738be01717173d252d989dce9 (diff)
downloadlilv-c220a3ce918293855ed6b53b97dc604573fd031a.tar.gz
lilv-c220a3ce918293855ed6b53b97dc604573fd031a.tar.bz2
lilv-c220a3ce918293855ed6b53b97dc604573fd031a.zip
Fix memory leaks.
Avoid unnecessary URI copy on plugin load. git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@2085 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/plugin.c')
-rw-r--r--src/plugin.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/plugin.c b/src/plugin.c
index bb294a8..baea5f5 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -208,10 +208,8 @@ slv2_plugin_load(SLV2Plugin p)
// Parse all the plugin's data files into RDF model
for (unsigned i=0; i < slv2_values_size(p->data_uris); ++i) {
SLV2Value data_uri_val = slv2_values_get_at(p->data_uris, i);
- librdf_uri* data_uri = librdf_new_uri(p->world->world,
- (const unsigned char*)slv2_value_as_uri(data_uri_val));
+ librdf_uri* data_uri = slv2_value_as_librdf_uri(data_uri_val);
librdf_parser_parse_into_model(p->world->parser, data_uri, NULL, p->rdf);
- librdf_free_uri(data_uri);
}
}