summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-07-16 08:01:48 (GMT)
committerTobias Markmann <tm@ayena.de>2015-07-16 08:03:55 (GMT)
commitb9edc9bbf5e304a1b2cec8f963c0d8d53ff0e2f2 (patch)
tree4200e375655c3da7fc4662bc9878535d92885376 /Swiften
parent382bce69ae2e94a2b9635a0be6db93a6ecd4ddce (diff)
downloadswift-b9edc9bbf5e304a1b2cec8f963c0d8d53ff0e2f2.zip
swift-b9edc9bbf5e304a1b2cec8f963c0d8d53ff0e2f2.tar.bz2
Fix memory leak in SOCKS5BytestreamServerManager
Test-Information: This LSAN reported leak is gone with this fix. Change-Id: Ib25fdfb7f4a82f62cd3f82ddb99f45618ea72ea9
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp b/Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp
index 3137163..f531856 100644
--- a/Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp
+++ b/Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp
@@ -12,21 +12,21 @@
#include <Swiften/FileTransfer/SOCKS5BytestreamServerManager.h>
-#include <boost/smart_ptr/make_shared.hpp>
#include <boost/bind.hpp>
+#include <boost/smart_ptr/make_shared.hpp>
-#include <Swiften/FileTransfer/SOCKS5BytestreamServerResourceUser.h>
-#include <Swiften/FileTransfer/SOCKS5BytestreamServerPortForwardingUser.h>
-#include <Swiften/Base/foreach.h>
#include <Swiften/Base/Log.h>
+#include <Swiften/Base/foreach.h>
#include <Swiften/FileTransfer/SOCKS5BytestreamServer.h>
+#include <Swiften/FileTransfer/SOCKS5BytestreamServerPortForwardingUser.h>
+#include <Swiften/FileTransfer/SOCKS5BytestreamServerResourceUser.h>
#include <Swiften/Network/ConnectionServer.h>
#include <Swiften/Network/ConnectionServerFactory.h>
-#include <Swiften/Network/NetworkEnvironment.h>
-#include <Swiften/Network/NATTraverser.h>
-#include <Swiften/Network/NATTraversalGetPublicIPRequest.h>
#include <Swiften/Network/NATTraversalForwardPortRequest.h>
+#include <Swiften/Network/NATTraversalGetPublicIPRequest.h>
#include <Swiften/Network/NATTraversalRemovePortForwardingRequest.h>
+#include <Swiften/Network/NATTraverser.h>
+#include <Swiften/Network/NetworkEnvironment.h>
using namespace Swift;
@@ -194,6 +194,7 @@ void SOCKS5BytestreamServerManager::stop() {
}
if (server) {
server->stop();
+ delete server;
server = NULL;
}
if (connectionServer) {