r16068 - gnucash/trunk/src/app-utils - Fix memory leak: Returned strings from gconf need to be freed.
Christian Stimming
cstim at cvs.gnucash.org
Tue May 8 17:06:17 EDT 2007
Author: cstim
Date: 2007-05-08 17:06:16 -0400 (Tue, 08 May 2007)
New Revision: 16068
Trac: http://svn.gnucash.org/trac/changeset/16068
Modified:
gnucash/trunk/src/app-utils/gnc-accounting-period.c
Log:
Fix memory leak: Returned strings from gconf need to be freed.
Modified: gnucash/trunk/src/app-utils/gnc-accounting-period.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-accounting-period.c 2007-05-08 21:05:21 UTC (rev 16067)
+++ gnucash/trunk/src/app-utils/gnc-accounting-period.c 2007-05-08 21:06:16 UTC (rev 16068)
@@ -92,7 +92,7 @@
const gchar *key_relative,
GDate *fy_end)
{
- const gchar *choice;
+ gchar *choice;
time_t time;
int which;
@@ -104,6 +104,7 @@
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;
More information about the gnucash-changes
mailing list