Fix memory leak: Returned strings from gconf need to be freed.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16068 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2007-05-08 21:06:16 +00:00
parent 2ffe0b0832
commit 125d497ecf

View File

@ -92,7 +92,7 @@ lookup_end_date_option(const gchar *section,
const gchar *key_relative,
GDate *fy_end)
{
const gchar *choice;
gchar *choice;
time_t time;
int which;
@ -104,6 +104,7 @@ lookup_end_date_option(const gchar *section,
which = gnc_gconf_get_int(section, key_relative, NULL);
time = gnc_accounting_period_end_timet(which, fy_end, NULL);
}
g_free(choice);
if (time == 0)
time = -1;
return time;