2004-09-02 [colin] 0.9.12cvs91.2
authorColin Leroy <colin@colino.net>
Thu, 2 Sep 2004 14:56:53 +0000 (14:56 +0000)
committerColin Leroy <colin@colino.net>
Thu, 2 Sep 2004 14:56:53 +0000 (14:56 +0000)
* src/common/xml.c
Fix leak

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/common/xml.c

index f2a2f0f72961de797a0e8dc7c106f6710dba9f04..f6acc6c15ce2f3b4a86ef21d3eee65e32a397724 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-02 [colin]     0.9.12cvs91.2
+
+       * src/common/xml.c
+               Fix leak
+
 2004-09-02 [colin]     0.9.12cvs91.1
 
        * src/gtk/menu.c
index 28eafde7cc38787b98952fc3515ff13726f85ef4..f8cab7d7bbb02643ade93266610452cd6def4c5a 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.28.2.2 -r 1.28.2.3 src/addrindex.c; ) > 0.9.12cvs89.1.patchset
 ( cvs diff -u -r 1.61.2.8 -r 1.61.2.10 src/account.c; ) > 0.9.12cvs90.1.patchset
 ( cvs diff -u -r 1.5.2.10 -r 1.5.2.11 src/gtk/menu.c; ) > 0.9.12cvs91.1.patchset
+( cvs diff -u -r 1.1.4.4 -r 1.1.4.5 src/common/xml.c; ) > 0.9.12cvs91.2.patchset
index e71c94ae9941194c61935da2c8413b91ab348bfa..e9f244c394f0f245d4569a870e7d372a3224b389 100644 (file)
@@ -13,7 +13,7 @@ INTERFACE_AGE=0
 BINARY_AGE=0
 EXTRA_VERSION=91
 EXTRA_RELEASE=
-EXTRA_GTK2_VERSION=.1
+EXTRA_GTK2_VERSION=.2
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
index 4f4dfddb28a4b0a5b79d177539d78a8065192cbd..d6621449fc08084a10514d445db0d4de3c9cb3b6 100644 (file)
@@ -263,30 +263,27 @@ gint xml_parse_next_tag(XMLFile *file)
                g_strchomp(attr_name);
                xml_unescape_str(attr_value);
 
-#warning FIXME_GTK2
-               utf8attr_name  = conv_codeset_strdup
+               if (!g_utf8_validate(attr_name, -1, NULL))
+                       utf8attr_name  = conv_codeset_strdup
                                        (attr_name,
                                         conv_get_current_charset_str(),
                                         CS_UTF_8);
-               utf8attr_value = conv_codeset_strdup
+               else
+                       utf8attr_name = g_strdup(attr_name);
+               
+               if (!g_utf8_validate(attr_value, -1, NULL))
+                       utf8attr_value = conv_codeset_strdup
                                        (attr_value,
                                         conv_get_current_charset_str(),
                                         CS_UTF_8);
-               if (!utf8attr_name) {
-                       g_warning("xml_parse_next_tag(): "
-                                 "faild to convert character set of attr_name\n");
-                       utf8attr_name = g_strdup(attr_name);
-               }
-               if (!utf8attr_value) {
-                       g_warning("xml_parse_next_tag(): "
-                                 "faild to convert character set of attr_value\n");
+               else
                        utf8attr_value = g_strdup(attr_value);
-               }
-               
+                                       
                attr = xml_attr_new(utf8attr_name, utf8attr_value);
                xml_tag_add_attr(tag, attr);
 
                g_free(utf8attr_name);
+               g_free(utf8attr_value);
        }
 
        return 0;