Free return values from recurrenceListToString() printed as debug info.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17224 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Phil Longstaff 2008-06-12 23:04:50 +00:00
parent 894c0f20a6
commit 23c6465903

View File

@ -414,12 +414,15 @@ sx_freqspec_handler( xmlNodePtr node, gpointer sx_pdata )
struct sx_pdata *pdata = sx_pdata;
SchedXaction *sx = pdata->sx;
GList *schedule;
gchar* debug_str;
g_return_val_if_fail( node, FALSE );
schedule = dom_tree_freqSpec_to_recurrences(node, pdata->book);
gnc_sx_set_schedule(sx, schedule);
g_debug("parsed from freqspec [%s]", recurrenceListToString(schedule));
debug_str = recurrenceListToString(schedule);
g_debug("parsed from freqspec [%s]", debug_str);
g_free(debug_str);
_fixup_recurrence_start_dates(xaccSchedXactionGetStartDate(sx), schedule);
pdata->saw_freqspec = TRUE;
@ -451,13 +454,16 @@ sx_recurrence_handler(xmlNodePtr node, gpointer _pdata)
{
struct sx_pdata *parsing_data = _pdata;
GList *schedule = NULL;
gchar* debug_str;
g_return_val_if_fail(node, FALSE);
if (!dom_tree_generic_parse(node, sx_recurrence_list_handlers, &schedule))
return FALSE;
// g_return_val_if_fail(schedule, FALSE);
g_debug("setting freshly-parsed schedule: [%s]", recurrenceListToString(schedule));
debug_str = recurrenceListToString(schedule);
g_debug("setting freshly-parsed schedule: [%s]", debug_str);
g_free(debug_str);
gnc_sx_set_schedule(parsing_data->sx, schedule);
parsing_data->saw_recurrence = TRUE;
return TRUE;