summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2015-12-10 12:34:17 +0900
committerDaiki Ueno <ueno@gnu.org>2015-12-10 12:35:34 +0900
commit94bfe38f02c9f33fe1762ef320a6f6b8a9e24175 (patch)
tree2397610848a7207661df1d1a138522059e069373
parent30d474e1cedc14611a725f1824c55dd6cc6f42b2 (diff)
downloadexternal_gettext-94bfe38f02c9f33fe1762ef320a6f6b8a9e24175.zip
external_gettext-94bfe38f02c9f33fe1762ef320a6f6b8a9e24175.tar.gz
external_gettext-94bfe38f02c9f33fe1762ef320a6f6b8a9e24175.tar.bz2
kde: Fix KUIT error handling when libxml2 is used
* gettext-tools/src/format-kde-kuit.c (format_parse): Return NULL if xmlReadMemory returns NULL.
-rw-r--r--gettext-tools/src/format-kde-kuit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gettext-tools/src/format-kde-kuit.c b/gettext-tools/src/format-kde-kuit.c
index afd6b15..128d05d 100644
--- a/gettext-tools/src/format-kde-kuit.c
+++ b/gettext-tools/src/format-kde-kuit.c
@@ -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);