Commit bf41f5e9 authored by Jussi Kukkonen's avatar Jussi Kukkonen

Move libxml2 init/deinit code to main()

parent b905b6dd
...@@ -168,9 +168,6 @@ gboolean geoclue_position_current_position(GeocluePosition *obj, gdouble* OUT_la ...@@ -168,9 +168,6 @@ gboolean geoclue_position_current_position(GeocluePosition *obj, gdouble* OUT_la
*OUT_longitude = -999.99; *OUT_longitude = -999.99;
xml = geoclue_position_get_hostip_xml(); xml = geoclue_position_get_hostip_xml();
xmlInitParser();
LIBXML_TEST_VERSION
doc = xmlParseDoc (xml); doc = xmlParseDoc (xml);
g_free(xml); g_free(xml);
...@@ -200,7 +197,6 @@ gboolean geoclue_position_current_position(GeocluePosition *obj, gdouble* OUT_la ...@@ -200,7 +197,6 @@ gboolean geoclue_position_current_position(GeocluePosition *obj, gdouble* OUT_la
} }
xmlFreeDoc(doc); xmlFreeDoc(doc);
} }
xmlCleanupParser();
return success; return success;
} }
...@@ -296,6 +292,7 @@ int main(int argc, char **argv) ...@@ -296,6 +292,7 @@ int main(int argc, char **argv)
* between the version it was compiled for and the actual shared * between the version it was compiled for and the actual shared
* library used. * library used.
*/ */
xmlInitParser();
LIBXML_TEST_VERSION LIBXML_TEST_VERSION
...@@ -309,6 +306,8 @@ int main(int argc, char **argv) ...@@ -309,6 +306,8 @@ int main(int argc, char **argv)
g_object_unref(obj); g_object_unref(obj);
g_main_loop_unref(obj->loop); g_main_loop_unref(obj->loop);
xmlCleanupParser();
return(0); return(0);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment