From 23c646590322a16fc3b51c768f7a25babd720eda Mon Sep 17 00:00:00 2001 From: Phil Longstaff Date: Thu, 12 Jun 2008 23:04:50 +0000 Subject: [PATCH] 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 --- src/backend/file/gnc-schedxaction-xml-v2.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/backend/file/gnc-schedxaction-xml-v2.c b/src/backend/file/gnc-schedxaction-xml-v2.c index 83b989042d..cdbd347e78 100644 --- a/src/backend/file/gnc-schedxaction-xml-v2.c +++ b/src/backend/file/gnc-schedxaction-xml-v2.c @@ -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;