mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
2ffe0b0832
commit
125d497ecf
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user