diff --git a/src/input/device_manager.cpp b/src/input/device_manager.cpp index c547f2be1..1e266349f 100644 --- a/src/input/device_manager.cpp +++ b/src/input/device_manager.cpp @@ -490,6 +490,7 @@ bool DeviceManager::load() if(input->getName()!="input") { Log::warn("DeviceManager", "Invalid input.xml file - no input node."); + delete input; return false; } @@ -500,6 +501,7 @@ bool DeviceManager::load() GUIEngine::showMessage(_("Please re-configure your key bindings.")); GUIEngine::showMessage(_("Your input config file is not compatible " "with this version of STK.")); + delete input; return false; } diff --git a/src/network/servers_manager.cpp b/src/network/servers_manager.cpp index ba360cf3d..3fa08d4fb 100644 --- a/src/network/servers_manager.cpp +++ b/src/network/servers_manager.cpp @@ -191,8 +191,10 @@ Online::XMLRequest* ServersManager::getLANRefreshRequest() const m_success = true; } // if received_data } // while still waiting - if (!m_success) - m_info = _("No LAN server detected"); + + delete broadcast; + if (!m_success) + m_info = _("No LAN server detected"); } // operation // -------------------------------------------------------------------- /** This function is necessary, otherwise the XML- and HTTP-Request diff --git a/src/tracks/navmesh.cpp b/src/tracks/navmesh.cpp index a43f1fe7c..f29afcf31 100644 --- a/src/tracks/navmesh.cpp +++ b/src/tracks/navmesh.cpp @@ -46,6 +46,7 @@ NavMesh::NavMesh(const std::string &filename) if(xml->getName()!="navmesh") { Log::error("NavMesh", "NavMesh is invalid. \n"); + delete xml; return; }