summaryrefslogtreecommitdiffstats
path: root/src/world.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-12-29 10:19:37 -0500
committerDavid Robillard <d@drobilla.net>2017-12-29 10:44:36 -0500
commit3c427ddbbb38eb271dcd1b8d23cbe07c8a8be025 (patch)
treed338d5e01bc17a6d36f229846a8663eeb01fe3bb /src/world.c
parent8c13a50d14f01935919bfb774b02d0cbfdd42fd7 (diff)
downloadlilv-3c427ddbbb38eb271dcd1b8d23cbe07c8a8be025.tar.gz
lilv-3c427ddbbb38eb271dcd1b8d23cbe07c8a8be025.tar.bz2
lilv-3c427ddbbb38eb271dcd1b8d23cbe07c8a8be025.zip
Fix potential memory leaks
Diffstat (limited to 'src/world.c')
-rw-r--r--src/world.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/world.c b/src/world.c
index fb3f7e0..1d8fec8 100644
--- a/src/world.c
+++ b/src/world.c
@@ -54,7 +54,7 @@ lilv_world_new(void)
#define NS_DYNMAN "http://lv2plug.in/ns/ext/dynmanifest#"
#define NS_OWL "http://www.w3.org/2002/07/owl#"
-#define NEW_URI(uri) sord_new_uri(world->world, (const uint8_t*)uri)
+#define NEW_URI(uri) sord_new_uri(world->world, (const uint8_t*)(uri))
world->uris.dc_replaces = NEW_URI(NS_DCTERMS "replaces");
world->uris.dman_DynManifest = NEW_URI(NS_DYNMAN "DynManifest");
@@ -598,6 +598,9 @@ lilv_world_load_dyn_manifest(LilvWorld* world,
const SordNode* plug = sord_iter_get_node(p, SORD_SUBJECT);
lilv_world_add_plugin(world, plug, manifest, desc, bundle_node);
}
+ if (desc->refs == 0) {
+ free(desc);
+ }
sord_iter_free(p);
sord_free(plugins);
lilv_free(lib_path);