From 7582e28e2737a53bdf98cd7a897541e61bc1cac7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 12 Jul 2024 20:48:49 -0400 Subject: Fix minor memory leaks --- NEWS | 3 ++- src/jalv.c | 1 + src/jalv_gtk.c | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index c0efdf2..f0bf4a8 100644 --- a/NEWS +++ b/NEWS @@ -6,12 +6,13 @@ jalv (1.6.9) unstable; urgency=medium * Build Qt UI with -fPIC * Clean up command line help output * Fix clashing command line options + * Fix minor memory leaks * Remove Gtk2 interface * Replace use of deprecated Gtk interfaces * Switch to external zix dependency * Use Gtk switches instead of checkboxes for toggle controls - -- David Robillard Fri, 12 Jul 2024 17:26:57 +0000 + -- David Robillard Sat, 13 Jul 2024 00:46:42 +0000 jalv (1.6.8) stable; urgency=medium 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; -- cgit v1.2.1