mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix small memory leak - unfreed string.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16061 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
3d4136fbac
commit
9488ce91e3
@ -262,13 +262,16 @@ gnc_module_get_symbol(GModule* gmodule, const char* symbol, gpointer res)
|
|||||||
{
|
{
|
||||||
gchar** strs;
|
gchar** strs;
|
||||||
gchar* munged_symbol;
|
gchar* munged_symbol;
|
||||||
|
gchar *basename;
|
||||||
gboolean ret;
|
gboolean ret;
|
||||||
|
|
||||||
g_return_val_if_fail(gmodule, FALSE);
|
g_return_val_if_fail(gmodule, FALSE);
|
||||||
g_return_val_if_fail(symbol, FALSE);
|
g_return_val_if_fail(symbol, FALSE);
|
||||||
|
|
||||||
/* Separate the file from its extension */
|
/* 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 */
|
/* Translate any dashes to underscores */
|
||||||
g_strdelimit(strs[0], "-", '_');
|
g_strdelimit(strs[0], "-", '_');
|
||||||
|
Loading…
Reference in New Issue
Block a user