diff options
author | Tobias Markmann <tm@ayena.de> | 2015-06-30 07:02:01 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2015-07-07 19:58:12 (GMT) |
commit | 799a7ac203dc2576872894dfdd1adb5cdbbacf7b (patch) | |
tree | e0242decf49222b83674143cf04f61c3dc01bc35 /Swiften/FileTransfer/UnitTest/OutgoingJingleFileTransferTest.cpp | |
parent | abd96284e162b3594bd0fc90a5da6b78709dee23 (diff) | |
download | swift-799a7ac203dc2576872894dfdd1adb5cdbbacf7b.zip swift-799a7ac203dc2576872894dfdd1adb5cdbbacf7b.tar.bz2 |
Fix memory leaks reported by ASAN
Test-Information:
Tested on Elementary OS with a LLVM/Clang 3.7.0 build. With this patch
the reports for the fixed locations are gone.
Change-Id: I0260fc85ad662335a69ace331f51ebe2f864ef97
Diffstat (limited to 'Swiften/FileTransfer/UnitTest/OutgoingJingleFileTransferTest.cpp')
-rw-r--r-- | Swiften/FileTransfer/UnitTest/OutgoingJingleFileTransferTest.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Swiften/FileTransfer/UnitTest/OutgoingJingleFileTransferTest.cpp b/Swiften/FileTransfer/UnitTest/OutgoingJingleFileTransferTest.cpp index 0186e0b..40e7233 100644 --- a/Swiften/FileTransfer/UnitTest/OutgoingJingleFileTransferTest.cpp +++ b/Swiften/FileTransfer/UnitTest/OutgoingJingleFileTransferTest.cpp @@ -7,19 +7,21 @@ /* * Copyright (c) 2013-2015 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ -#include <cppunit/extensions/HelperMacros.h> -#include <cppunit/extensions/TestFactoryRegistry.h> +#include <iostream> #include <boost/bind.hpp> #include <boost/optional.hpp> #include <boost/smart_ptr/make_shared.hpp> +#include <cppunit/extensions/HelperMacros.h> +#include <cppunit/extensions/TestFactoryRegistry.h> + #include <Swiften/Base/ByteArray.h> #include <Swiften/Base/IDGenerator.h> #include <Swiften/Base/Override.h> #include <Swiften/Client/DummyStanzaChannel.h> #include <Swiften/Crypto/CryptoProvider.h> #include <Swiften/Crypto/PlatformCryptoProvider.h> @@ -44,14 +46,12 @@ #include <Swiften/Network/DummyConnectionServerFactory.h> #include <Swiften/Network/DummyTimerFactory.h> #include <Swiften/Network/PlatformNATTraversalWorker.h> #include <Swiften/Network/PlatformNetworkEnvironment.h> #include <Swiften/Queries/IQRouter.h> -#include <iostream> - using namespace Swift; class OutgoingJingleFileTransferTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(OutgoingJingleFileTransferTest); CPPUNIT_TEST(test_SendSessionInitiateOnStart); CPPUNIT_TEST(test_FallbackToIBBAfterFailingS5B); @@ -120,16 +120,19 @@ public: s5bProxy = new SOCKS5BytestreamProxiesManager(connectionFactory, timerFactory, resolver, iqRouter, "bar.com"); ftTransportFactory = new DummyFileTransferTransporterFactory(s5bRegistry, bytestreamServerManager, s5bProxy, idGen, connectionFactory, timerFactory, crypto.get(), iqRouter); } void tearDown() { delete ftTransportFactory; + delete networkEnvironment; + delete natTraverser; delete bytestreamServerManager; delete s5bProxy; delete idGen; delete s5bRegistry; + delete serverConnectionFactory; delete connectionFactory; delete timerFactory; delete eventLoop; delete iqRouter; delete stanzaChannel; } |