diff --git a/libgnucash/app-utils/gnc-ui-util.c b/libgnucash/app-utils/gnc-ui-util.c index c4e3a86c0d..5fa6430842 100644 --- a/libgnucash/app-utils/gnc-ui-util.c +++ b/libgnucash/app-utils/gnc-ui-util.c @@ -590,13 +590,13 @@ gnc_ui_account_get_tax_info_string (const Account *account) { gchar *form = NULL; - /* Note: using scm_to_utf8_string directly here instead + /* Note: using scm_to_utf8_stringn directly here instead of our wrapper gnc_scm_to_utf8_string. 'form' should be freed with 'free' instead of 'g_free'. This will be taken care of automatically during scm_dynwind_end, because we inform guile of this memory allocation via scm_dynwind_free a little further. */ - form = scm_to_utf8_string (form_scm); + form = scm_to_utf8_stringn (form_scm, NULL); if (!form) { if (tax_related) diff --git a/libgnucash/core-utils/gnc-guile-utils.c b/libgnucash/core-utils/gnc-guile-utils.c index e86fe9f7f3..99e46d7d2c 100644 --- a/libgnucash/core-utils/gnc-guile-utils.c +++ b/libgnucash/core-utils/gnc-guile-utils.c @@ -43,7 +43,7 @@ gchar *gnc_scm_to_utf8_string(SCM scm_string) gchar* s; char * str; - str = scm_to_utf8_string(scm_string); + str = scm_to_utf8_stringn(scm_string, NULL); s = g_strdup(str); free (str); return s;