Free two GErrors after they have been logged.

BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17093 57a11ea4-9604-0410-9ed3-97b8803252fd
2.4
Andreas Köhler 18 years ago
parent d9ad51488a
commit f52e803765

@ -213,8 +213,10 @@ gnc_locale_from_utf8(const gchar* str)
/* Convert from UTF-8 to the encoding used in the current locale. */
locale_str = g_locale_from_utf8(str, -1, NULL, &bytes_written, &err);
if (err)
if (err) {
g_warning("g_locale_from_utf8 failed: %s", err->message);
g_error_free(err);
}
return locale_str;
}
@ -228,8 +230,10 @@ gnc_locale_to_utf8(const gchar* str)
/* Convert to UTF-8 from the encoding used in the current locale. */
utf8_str = g_locale_to_utf8(str, -1, NULL, &bytes_written, &err);
if (err)
if (err) {
g_warning("g_locale_to_utf8 failed: %s", err->message);
g_error_free(err);
}
return utf8_str;
}

Loading…
Cancel
Save