aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-07-12 20:48:49 -0400
committerDavid Robillard <d@drobilla.net>2024-07-12 20:48:49 -0400
commit7582e28e2737a53bdf98cd7a897541e61bc1cac7 (patch)
tree511c7008b0a10ff119ca0e54da13e695f4727bfb /src
parentfa2b39f0338f6ae42b35ae736abeefec5d2185ab (diff)
downloadjalv-7582e28e2737a53bdf98cd7a897541e61bc1cac7.tar.gz
jalv-7582e28e2737a53bdf98cd7a897541e61bc1cac7.tar.bz2
jalv-7582e28e2737a53bdf98cd7a897541e61bc1cac7.zip
Fix minor memory leaks
Diffstat (limited to 'src')
-rw-r--r--src/jalv.c1
-rw-r--r--src/jalv_gtk.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/jalv.c b/src/jalv.c
index be45aa4..67add52 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -1443,6 +1443,7 @@ jalv_close(Jalv* const jalv)
}
// Clean up
+ lilv_state_free(jalv->preset);
free(jalv->ports);
zix_ring_free(jalv->ui_to_plugin);
zix_ring_free(jalv->plugin_to_ui);
diff --git a/src/jalv_gtk.c b/src/jalv_gtk.c
index 5b7240b..1af37ef 100644
--- a/src/jalv_gtk.c
+++ b/src/jalv_gtk.c
@@ -1175,6 +1175,7 @@ build_control_widget(Jalv* jalv, GtkWidget* window)
GTK_ALIGN_START,
GTK_ALIGN_BASELINE);
+ lilv_node_free(group_name);
gtk_grid_attach(GTK_GRID(port_grid), group_label, 0, n_rows, 3, 1);
++n_rows;
}
@@ -1507,6 +1508,11 @@ jalv_frontend_open(Jalv* jalv)
gtk_main();
suil_instance_free(jalv->ui_instance);
+
+ for (unsigned i = 0U; i < jalv->controls.n_controls; ++i) {
+ free(jalv->controls.controls[i]->widget); // free Controller
+ }
+
jalv->ui_instance = NULL;
zix_sem_post(&jalv->done);
return 0;