From 454f7c8b0ac63c1291fba5445d870773d0c980d3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 11 Apr 2012 03:04:28 +0000 Subject: Fix memory leak. git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@4159 a436a847-0d15-0410-975c-d299462d15a1 --- src/jalv.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/jalv.c') diff --git a/src/jalv.c b/src/jalv.c index fbbd95e..042f7bc 100644 --- a/src/jalv.c +++ b/src/jalv.c @@ -770,9 +770,9 @@ main(int argc, char** argv) const LilvNode* ui_type = NULL; host.ui = NULL; if (native_ui_type) { - LilvUIs* uis = lilv_plugin_get_uis(host.plugin); // FIXME: leak - LILV_FOREACH(uis, u, uis) { - const LilvUI* this_ui = lilv_uis_get(uis, u); + host.uis = lilv_plugin_get_uis(host.plugin); + LILV_FOREACH(uis, u, host.uis) { + const LilvUI* this_ui = lilv_uis_get(host.uis, u); if (lilv_ui_is_supported( this_ui, suil_ui_supported, native_ui_type, &ui_type)) { // TODO: Multiple UI support @@ -959,6 +959,7 @@ main(int argc, char** argv) symap_free(host.symap); suil_host_free(ui_host); sratom_free(host.sratom); + lilv_uis_free(host.uis); lilv_world_free(world); zix_sem_destroy(&exit_sem); -- cgit v1.2.1