AUDIT: r17093 - gnucash/trunk/src/core-utils - Free two GErrors after they have been logged.
Andreas Köhler
andi5 at cvs.gnucash.org
Sun Apr 20 14:07:10 EDT 2008
Author: andi5
Date: 2008-04-20 14:07:10 -0400 (Sun, 20 Apr 2008)
New Revision: 17093
Trac: http://svn.gnucash.org/trac/changeset/17093
Modified:
gnucash/trunk/src/core-utils/gnc-glib-utils.c
Log:
Free two GErrors after they have been logged.
BP
Modified: gnucash/trunk/src/core-utils/gnc-glib-utils.c
===================================================================
--- gnucash/trunk/src/core-utils/gnc-glib-utils.c 2008-04-19 20:13:12 UTC (rev 17092)
+++ gnucash/trunk/src/core-utils/gnc-glib-utils.c 2008-04-20 18:07:10 UTC (rev 17093)
@@ -213,8 +213,10 @@
/* 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 @@
/* 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;
}
More information about the gnucash-changes
mailing list