From e5eafea1283cbb66edb4b5298590e982ee5a5c64 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 16 Jan 2023 05:11:49 +0100 Subject: [PATCH] Fix small memory leak g_file_open_tmp() requires the caller to free the filename. --- gtk2_ardour/keyeditor.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk2_ardour/keyeditor.cc b/gtk2_ardour/keyeditor.cc index bc5eb19287..e5e723e720 100644 --- a/gtk2_ardour/keyeditor.cc +++ b/gtk2_ardour/keyeditor.cc @@ -604,6 +604,7 @@ KeyEditor::print () const if (err) { error << string_compose (_("Could not save bindings to file (%1)"), err->message) << endmsg; g_error_free (err); + g_free (file_name); } return; } @@ -613,4 +614,5 @@ KeyEditor::print () const #endif PBD::open_uri (string_compose ("file:///%1", file_name)); + g_free (file_name); }