Do not leak xml here

master
Yevgen Muntyan 2007-07-03 01:18:24 -05:00
parent 3bff37c330
commit 9faa4c6434
1 changed files with 2 additions and 0 deletions

View File

@ -986,6 +986,7 @@ _gtk_source_style_scheme_new_from_file (const gchar *filename)
gchar *filename_utf8 = g_filename_display_name (filename);
g_warning ("could not load scheme file '%s': empty document", filename_utf8);
g_free (filename_utf8);
xmlFreeDoc (doc);
g_free (text);
return NULL;
}
@ -1004,6 +1005,7 @@ _gtk_source_style_scheme_new_from_file (const gchar *filename)
scheme = NULL;
}
xmlFreeDoc (doc);
g_free (text);
return scheme;
}