[gnome-builder] xml-pack: fix IdeXmlSchemaCacheEntry leak
- From: Sébastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] xml-pack: fix IdeXmlSchemaCacheEntry leak
- Date: Tue, 18 Jul 2017 22:42:59 +0000 (UTC)
commit 5a03e10a2b833aa7ade6adc28f5245e50282f76c
Author: Sebastien Lafargue <slafargue gnome org>
Date: Wed Jul 19 00:03:39 2017 +0200
xml-pack: fix IdeXmlSchemaCacheEntry leak
plugins/xml-pack/ide-xml-parser.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/plugins/xml-pack/ide-xml-parser.c b/plugins/xml-pack/ide-xml-parser.c
index 3a6cc83..906c2f2 100644
--- a/plugins/xml-pack/ide-xml-parser.c
+++ b/plugins/xml-pack/ide-xml-parser.c
@@ -490,16 +490,15 @@ ide_xml_parser_processing_instruction_sax_cb (ParserState *state,
else
goto fail;
- entry = ide_xml_schema_cache_entry_new ();
- entry->kind = kind;
-
- ide_xml_sax_get_location (self->sax_parser, &entry->line, &entry->col, NULL, NULL, NULL, NULL);
/* We skip adding gtkbuilder.rng here and add it from gresources after the parsing */
if (g_str_has_suffix (schema_url, "gtkbuilder.rng"))
return;
- else
- entry->file = get_absolute_schema_file (state->file, schema_url);
+ entry = ide_xml_schema_cache_entry_new ();
+ entry->file = get_absolute_schema_file (state->file, schema_url);;
+ entry->kind = kind;
+
+ ide_xml_sax_get_location (self->sax_parser, &entry->line, &entry->col, NULL, NULL, NULL, NULL);
/* Needed to pass the kind to the service schema fetcher */
g_object_set_data (G_OBJECT (entry->file), "kind", GUINT_TO_POINTER (entry->kind));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]