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 | |||
| @@ -10,13 +10,15 @@ | |||
| 10 | * See the COPYING file for more information. | 10 | * See the COPYING file for more information. |
| 11 | */ | 11 | */ |
| 12 | 12 | ||
| 13 | #include <cppunit/extensions/HelperMacros.h> | 13 | #include <iostream> |
| 14 | #include <cppunit/extensions/TestFactoryRegistry.h> | ||
| 15 | 14 | ||
| 16 | #include <boost/bind.hpp> | 15 | #include <boost/bind.hpp> |
| 17 | #include <boost/optional.hpp> | 16 | #include <boost/optional.hpp> |
| 18 | #include <boost/smart_ptr/make_shared.hpp> | 17 | #include <boost/smart_ptr/make_shared.hpp> |
| 19 | 18 | ||
| 19 | #include <cppunit/extensions/HelperMacros.h> | ||
| 20 | #include <cppunit/extensions/TestFactoryRegistry.h> | ||
| 21 | |||
| 20 | #include <Swiften/Base/ByteArray.h> | 22 | #include <Swiften/Base/ByteArray.h> |
| 21 | #include <Swiften/Base/IDGenerator.h> | 23 | #include <Swiften/Base/IDGenerator.h> |
| 22 | #include <Swiften/Base/Override.h> | 24 | #include <Swiften/Base/Override.h> |
| @@ -47,8 +49,6 @@ | |||
| 47 | #include <Swiften/Network/PlatformNetworkEnvironment.h> | 49 | #include <Swiften/Network/PlatformNetworkEnvironment.h> |
| 48 | #include <Swiften/Queries/IQRouter.h> | 50 | #include <Swiften/Queries/IQRouter.h> |
| 49 | 51 | ||
| 50 | #include <iostream> | ||
| 51 | |||
| 52 | using namespace Swift; | 52 | using namespace Swift; |
| 53 | 53 | ||
| 54 | class OutgoingJingleFileTransferTest : public CppUnit::TestFixture { | 54 | class OutgoingJingleFileTransferTest : public CppUnit::TestFixture { |
| @@ -123,10 +123,13 @@ public: | |||
| 123 | 123 | ||
| 124 | void tearDown() { | 124 | void tearDown() { |
| 125 | delete ftTransportFactory; | 125 | delete ftTransportFactory; |
| 126 | delete networkEnvironment; | ||
| 127 | delete natTraverser; | ||
| 126 | delete bytestreamServerManager; | 128 | delete bytestreamServerManager; |
| 127 | delete s5bProxy; | 129 | delete s5bProxy; |
| 128 | delete idGen; | 130 | delete idGen; |
| 129 | delete s5bRegistry; | 131 | delete s5bRegistry; |
| 132 | delete serverConnectionFactory; | ||
| 130 | delete connectionFactory; | 133 | delete connectionFactory; |
| 131 | delete timerFactory; | 134 | delete timerFactory; |
| 132 | delete eventLoop; | 135 | delete eventLoop; |
Swift