From 3c427ddbbb38eb271dcd1b8d23cbe07c8a8be025 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 29 Dec 2017 10:19:37 -0500 Subject: Fix potential memory leaks --- src/world.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.1