summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-05-08 20:57:38 +0300
committerAndrei Karas <akaras@inbox.ru>2017-05-08 20:57:38 +0300
commit275cc0d950621404b8284f324e08a218c7f681c9 (patch)
treefb44a808193517575f0f4cf927563c2de2838b6a
parentc594e25496f682ffe9ef63f1c25e0ac5156bbdcd (diff)
downloadmanaplus-275cc0d950621404b8284f324e08a218c7f681c9.tar.gz
manaplus-275cc0d950621404b8284f324e08a218c7f681c9.tar.bz2
manaplus-275cc0d950621404b8284f324e08a218c7f681c9.tar.xz
manaplus-275cc0d950621404b8284f324e08a218c7f681c9.zip
Fix leaks in ipc.
-rw-r--r--src/client.cpp2
-rw-r--r--src/net/ipc.cpp1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index d379d8917..0dd0b7326 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -627,6 +627,8 @@ void Client::gameClear()
delete2(assertListener);
+ if (ipc)
+ ipc->stop();
eventsManager.shutdown();
WindowManager::deleteWindows();
if (windowContainer)
diff --git a/src/net/ipc.cpp b/src/net/ipc.cpp
index c694417c9..e77cad713 100644
--- a/src/net/ipc.cpp
+++ b/src/net/ipc.cpp
@@ -145,6 +145,7 @@ int IPC::acceptLoop(void *ptr)
TcpNet::closeSocket(sock);
}
TcpNet::closeSocket(ipc1->mSocket);
+ TcpNet::freeSocketSet(set);
ipc1->mSocket = nullptr;
ipc1->mThread = nullptr;
return 0;