mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fixes to memory deallocation suggested by Phil Longstaff.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13472 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2006-03-04 Joshua Sled <jsled@asynchronous.org>
|
||||
|
||||
* src/gnome-utils/gnc-menu-extensions.c (gnc_extension_path):
|
||||
Fixes to memory deallocation suggested by Phil Longstaff
|
||||
<plongstaff@newearth.org>.
|
||||
|
||||
2006-03-04 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/gnome-utils/dialog-preferences.c:
|
||||
|
||||
@@ -127,6 +127,7 @@ gnc_extension_path (SCM extension, char **fullpath)
|
||||
SCM path;
|
||||
gchar **strings;
|
||||
gint i;
|
||||
gint num_strings;
|
||||
|
||||
initialize_getters();
|
||||
|
||||
@@ -136,7 +137,8 @@ gnc_extension_path (SCM extension, char **fullpath)
|
||||
return;
|
||||
}
|
||||
|
||||
strings = g_new0(gchar *, scm_ilength(path) + 2);
|
||||
num_strings = scm_ilength(path) + 2;
|
||||
strings = g_new0(gchar *, num_strings);
|
||||
strings[0] = "/menubar";
|
||||
|
||||
i = 1;
|
||||
@@ -169,6 +171,14 @@ gnc_extension_path (SCM extension, char **fullpath)
|
||||
|
||||
*fullpath = g_strjoinv("/", strings);
|
||||
|
||||
for (i = 1; i < num_strings; i++)
|
||||
{
|
||||
if (strings[i] != NULL)
|
||||
{
|
||||
g_free(strings[i]);
|
||||
}
|
||||
}
|
||||
|
||||
g_free(strings);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user