]> git.0d.be Git - empathy.git/commitdiff
Call xmlCleanupParser() only once when exiting (#600693)
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 13 Jan 2010 10:28:29 +0000 (10:28 +0000)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 13 Jan 2010 11:08:56 +0000 (11:08 +0000)
This function should only be called when exiting the application as it cleans
up the memory allocated by the library itself.

Thanks to Lennart for pointing this out.

libempathy-gtk/empathy-plist.c
libempathy/empathy-chatroom-manager.c
libempathy/empathy-contact-groups.c
libempathy/empathy-irc-network-manager.c
src/empathy.c

index 4cc392becf15deebda18c380c85fdf5d5b61c67a..73d31466ac932481a7394139257a004cfcce01ee 100644 (file)
@@ -294,7 +294,6 @@ empathy_plist_parse_from_file (const char *filename)
        parsed_doc = empathy_plist_parse (root_element);
 
        xmlFreeDoc (doc);
-       xmlCleanupParser ();
 
        return parsed_doc;
 }
@@ -329,7 +328,6 @@ empathy_plist_parse_from_memory (const char *data, gsize len)
        parsed_doc = empathy_plist_parse (root_element);
 
        xmlFreeDoc (doc);
-       xmlCleanupParser ();
 
        return parsed_doc;
 }
index 56295fe5a9c80834f22e73508febe075078bd35c..bfb85f53f1695becf7e978f246868fb278d3e9cc 100644 (file)
@@ -127,7 +127,6 @@ chatroom_manager_file_save (EmpathyChatroomManager *manager)
        xmlSaveFormatFileEnc (priv->file, doc, "utf-8", 1);
        xmlFreeDoc (doc);
 
-       xmlCleanupParser ();
        xmlMemoryDump ();
 
        return TRUE;
index 7244c16228492e267ae02844cfa94ff68dc3e6e2..726824ea43ad03adfbc9a9ad49d5d91a505214cb 100644 (file)
@@ -221,7 +221,6 @@ contact_groups_file_save (void)
        xmlSaveFormatFileEnc (file, doc, "utf-8", 1);
        xmlFreeDoc (doc);
 
-       xmlCleanupParser ();
        xmlMemoryDump ();
 
        g_free (file);
index 0b5bcc855b7d67b4412e3d5d5a9dffb84d4c40d5..97d19a0eb2ab9dfb6312f691591945e9ceca45f0 100644 (file)
@@ -719,7 +719,6 @@ irc_network_manager_file_save (EmpathyIrcNetworkManager *self)
   xmlSaveFormatFileEnc (priv->user_file, doc, "utf-8", 1);
   xmlFreeDoc (doc);
 
-  xmlCleanupParser ();
   xmlMemoryDump ();
 
   priv->have_to_save = FALSE;
index ffb22a8eb9ef508c2272a8879be2624256368422..4baf5b8f71f4aa4bb9e688b02dca26987920b189 100644 (file)
@@ -1065,6 +1065,7 @@ main (int argc, char *argv[])
   g_object_unref (unique_app);
 
   notify_uninit ();
+  xmlCleanupParser ();
 
   return EXIT_SUCCESS;
 }