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
*OUT_longitude = -999.99;
xml = geoclue_position_get_hostip_xml();
xmlInitParser();
LIBXML_TEST_VERSION
doc = xmlParseDoc (xml);
g_free(xml);
......@@ -200,7 +197,6 @@ gboolean geoclue_position_current_position(GeocluePosition *obj, gdouble* OUT_la
}
xmlFreeDoc(doc);
}
xmlCleanupParser();
return success;
}
......@@ -296,6 +292,7 @@ int main(int argc, char **argv)
* between the version it was compiled for and the actual shared
* library used.
*/
xmlInitParser();
LIBXML_TEST_VERSION
......@@ -310,5 +307,7 @@ int main(int argc, char **argv)
g_object_unref(obj);
g_main_loop_unref(obj->loop);
xmlCleanupParser();
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