Skip to content
Snippets Groups Projects
Commit ce6fa020 authored by Lars Bilke's avatar Lars Bilke
Browse files

[GL] Possible memleak fix.

parent 082019e7
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,6 @@ namespace IO ...@@ -29,7 +29,6 @@ namespace IO
std::vector<GeoLib::Point*> *RapidStnInterface::readStationFile(const std::string &fileName) std::vector<GeoLib::Point*> *RapidStnInterface::readStationFile(const std::string &fileName)
{ {
auto* stations = new std::vector<GeoLib::Point*>;
std::ifstream in(fileName.c_str()); std::ifstream in(fileName.c_str());
if (in.fail()) if (in.fail())
{ {
...@@ -55,6 +54,8 @@ std::vector<GeoLib::Point*> *RapidStnInterface::readStationFile(const std::strin ...@@ -55,6 +54,8 @@ std::vector<GeoLib::Point*> *RapidStnInterface::readStationFile(const std::strin
return nullptr; return nullptr;
} }
auto* stations = new std::vector<GeoLib::Point*>;
// iterate over all station lists // iterate over all station lists
for (rapidxml::xml_node<>* station_list = doc.first_node()->first_node(); station_list; station_list = station_list->next_sibling()) for (rapidxml::xml_node<>* station_list = doc.first_node()->first_node(); station_list; station_list = station_list->next_sibling())
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment