]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
kde: Fix KUIT error handling when libxml2 is used
authorDaiki Ueno <ueno@gnu.org>
Thu, 10 Dec 2015 03:34:17 +0000 (12:34 +0900)
committerDaiki Ueno <ueno@gnu.org>
Thu, 10 Dec 2015 03:35:34 +0000 (12:35 +0900)
* gettext-tools/src/format-kde-kuit.c (format_parse): Return NULL if
xmlReadMemory returns NULL.

gettext-tools/src/format-kde-kuit.c

index afd6b15209786ba50a7e7cac8e2a40776ec3c06c..128d05d1ab436a4e24827f1826bbdf1286d75104 100644 (file)
@@ -243,6 +243,9 @@ format_parse (const char *format, bool translated, char *fdi,
           *invalid_reason =
             xasprintf (_("error while parsing: %s"),
                        err->message);
+          free (buffer);
+          xmlFreeDoc (doc);
+          return NULL;
         }
 
       free (buffer);