From f52e803765b9177382096ffd9a5f92e737bfb87f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=B6hler?= Date: Sun, 20 Apr 2008 18:07:10 +0000 Subject: [PATCH] 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 --- src/core-utils/gnc-glib-utils.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core-utils/gnc-glib-utils.c b/src/core-utils/gnc-glib-utils.c index 29f13fc7f3..e75738a68c 100644 --- a/src/core-utils/gnc-glib-utils.c +++ b/src/core-utils/gnc-glib-utils.c @@ -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; }