From 48207c6cc678d75ec8211a2e479898c21aa80ab6 Mon Sep 17 00:00:00 2001 From: rbuj Date: Fri, 22 Oct 2021 22:16:47 +0200 Subject: caja-module: fix memory leak --- libcaja-private/caja-module.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcaja-private/caja-module.c b/libcaja-private/caja-module.c index 70e93b10..7d35b47b 100644 --- a/libcaja-private/caja-module.c +++ b/libcaja-private/caja-module.c @@ -181,12 +181,14 @@ add_module_objects (CajaModule *module) if (module->list_pyfiles) { - filename = g_strconcat(g_list_nth_data(pyfiles, i), ".py", NULL); + g_free (filename); + filename = g_strconcat (g_list_nth_data (pyfiles, i), ".py", NULL); } object = caja_module_add_type (types[i]); caja_extension_register (filename, object); } + g_free (filename); } static CajaModule * @@ -231,6 +233,7 @@ load_module_dir (const char *dirname) name, NULL); caja_module_load_file (filename); + g_free (filename); } } g_dir_close (dir); -- cgit v1.2.1