Fix memory leak - return value from recurrenceToString()

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17161 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Phil Longstaff 2008-05-18 16:59:25 +00:00
parent 8d532f650c
commit 6f2674c4b6

View File

@ -431,9 +431,12 @@ static gboolean
sx_schedule_recurrence_handler(xmlNodePtr node, gpointer parsing_data)
{
GList **schedule = (GList**)parsing_data;
gchar* sched_str;
Recurrence *r = dom_tree_to_recurrence(node);
g_return_val_if_fail(r, FALSE);
g_debug("parsed recurrence [%s]", recurrenceToString(r));
sched_str = recurrenceToString(r);
g_debug("parsed recurrence [%s]", sched_str);
g_free(sched_str);
*schedule = g_list_append(*schedule, r);
return TRUE;
}