Blob Blame Raw
diff -up libxklavier-3.7/libxklavier/xklavier_config.c.sax-leak libxklavier-3.7/libxklavier/xklavier_config.c
--- libxklavier-3.7/libxklavier/xklavier_config.c.sax-leak	2008-09-19 00:25:10.000000000 -0400
+++ libxklavier-3.7/libxklavier/xklavier_config.c	2008-09-19 00:25:41.000000000 -0400
@@ -480,15 +480,13 @@ xkl_config_registry_load_from_file(XklCo
 				   const gchar * file_name)
 {
 	xmlParserCtxtPtr ctxt = xmlNewParserCtxt();
-	xmlSAXHandler *saxh = g_new0(xmlSAXHandler, 1);
 	xkl_debug(100, "Loading XML registry from file %s\n", file_name);
 
 	/* Filter out all unneeded languages! */
-	xmlSAX2InitDefaultSAXHandler(saxh, TRUE);
-	saxh->startElementNs = xkl_xml_sax_start_element_ns;
-	saxh->endElementNs = xkl_xml_sax_end_element_ns;
-	saxh->characters = xkl_xml_sax_characters;
-	ctxt->sax = saxh;
+	xmlSAX2InitDefaultSAXHandler(ctxt->sax, TRUE);
+	ctxt->sax->startElementNs = xkl_xml_sax_start_element_ns;
+	ctxt->sax->endElementNs = xkl_xml_sax_end_element_ns;
+	ctxt->sax->characters = xkl_xml_sax_characters;
 
 	xkl_config_registry_priv(config, doc) =
 	    xmlCtxtReadFile(ctxt, file_name, NULL, XML_PARSE_NOBLANKS);