diff options
author | David Robillard <d@drobilla.net> | 2017-12-29 10:19:37 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-12-29 10:44:36 -0500 |
commit | 3c427ddbbb38eb271dcd1b8d23cbe07c8a8be025 (patch) | |
tree | d338d5e01bc17a6d36f229846a8663eeb01fe3bb /src | |
parent | 8c13a50d14f01935919bfb774b02d0cbfdd42fd7 (diff) | |
download | lilv-3c427ddbbb38eb271dcd1b8d23cbe07c8a8be025.tar.gz lilv-3c427ddbbb38eb271dcd1b8d23cbe07c8a8be025.tar.bz2 lilv-3c427ddbbb38eb271dcd1b8d23cbe07c8a8be025.zip |
Fix potential memory leaks
Diffstat (limited to 'src')
-rw-r--r-- | src/world.c | 5 |
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); |