From 9488ce91e3fc25b95d553d2f6ca10c4ffb09df45 Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Tue, 8 May 2007 20:28:36 +0000 Subject: [PATCH] Fix small memory leak - unfreed string. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16061 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/gnc-module/gnc-module.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gnc-module/gnc-module.c b/src/gnc-module/gnc-module.c index 77e148972a..6063bfa014 100644 --- a/src/gnc-module/gnc-module.c +++ b/src/gnc-module/gnc-module.c @@ -262,13 +262,16 @@ gnc_module_get_symbol(GModule* gmodule, const char* symbol, gpointer res) { gchar** strs; gchar* munged_symbol; + gchar *basename; gboolean ret; g_return_val_if_fail(gmodule, FALSE); g_return_val_if_fail(symbol, FALSE); /* Separate the file from its extension */ - strs = g_strsplit(g_path_get_basename(g_module_name(gmodule)), ".", 2); + basename = g_path_get_basename(g_module_name(gmodule)); + strs = g_strsplit(basename, ".", 2); + g_free(basename); /* Translate any dashes to underscores */ g_strdelimit(strs[0], "-", '_');