diff options
author | David Robillard <d@drobilla.net> | 2015-01-29 22:49:40 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-01-29 22:49:40 +0000 |
commit | 48648e4330b224391307343198152cce4f446874 (patch) | |
tree | cd643b485161a7ea2bea5497a01788d06c0d2e8d /src/instance.c | |
parent | 4ff9f0b0b78681e4015feb1b2a54ec6f7becf563 (diff) | |
download | lilv-48648e4330b224391307343198152cce4f446874.tar.gz lilv-48648e4330b224391307343198152cce4f446874.tar.bz2 lilv-48648e4330b224391307343198152cce4f446874.zip |
Add lilv_file_uri_parse() for correct URI to path conversion.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5528 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/instance.c')
-rw-r--r-- | src/instance.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/instance.c b/src/instance.c index a3e2c91..ef64405 100644 --- a/src/instance.c +++ b/src/instance.c @@ -33,11 +33,12 @@ lilv_plugin_instantiate(const LilvPlugin* plugin, const LilvNode* const lib_uri = lilv_plugin_get_library_uri(plugin); const LilvNode* const bundle_uri = lilv_plugin_get_bundle_uri(plugin); - const char* bundle_path = lilv_uri_to_path( - lilv_node_as_uri(lilv_plugin_get_bundle_uri(plugin))); + char* const bundle_path = lilv_file_uri_parse( + lilv_node_as_uri(lilv_plugin_get_bundle_uri(plugin)), NULL); LilvLib* lib = lilv_lib_open(plugin->world, lib_uri, bundle_path, features); if (!lib) { + free(bundle_path); return NULL; } @@ -46,6 +47,7 @@ lilv_plugin_instantiate(const LilvPlugin* plugin, SerdURI base_uri; if (serd_uri_parse((const uint8_t*)bundle_uri_str, &base_uri)) { lilv_lib_close(lib); + free(bundle_path); return NULL; } @@ -93,6 +95,7 @@ lilv_plugin_instantiate(const LilvPlugin* plugin, } free(local_features); + free(bundle_path); if (result) { // Failed to instantiate |