From a23d903d67f05257f0e9376a212b83045ea768f1 Mon Sep 17 00:00:00 2001
From: Tobias Markmann <tm@ayena.de>
Date: Tue, 7 Jul 2015 16:30:15 +0200
Subject: Fix memory leaks reported by memcheck (Valgrind) in Jingle FT Tests

Test-Information:

Detected with valgrind-3.10.1 on OS X 10.9.5 and verified they are
gone with this fix.

Change-Id: I8cab09efd2227a8d43fa77bd2c315bd9b67435fb

diff --git a/Swiften/FileTransfer/UnitTest/IncomingJingleFileTransferTest.cpp b/Swiften/FileTransfer/UnitTest/IncomingJingleFileTransferTest.cpp
index 54d2c88..2fb39bb 100644
--- a/Swiften/FileTransfer/UnitTest/IncomingJingleFileTransferTest.cpp
+++ b/Swiften/FileTransfer/UnitTest/IncomingJingleFileTransferTest.cpp
@@ -89,15 +89,16 @@ public:
 
 		void tearDown() {
 			delete ftTransporterFactory;
-			delete networkEnvironment;
-			delete natTraverser;
-			delete bytestreamServerManager;
 			delete bytestreamProxy;
-			delete serverConnectionFactory;
-			delete connectionFactory;
 			delete timerFactory;
+			delete idGenerator;
+			delete bytestreamServerManager;
+			delete natTraverser;
+			delete networkEnvironment;
 			delete bytestreamRegistry;
 			delete iqRouter;
+			delete serverConnectionFactory;
+			delete connectionFactory;
 			delete stanzaChannel;
 			delete resolver;
 			delete eventLoop;
diff --git a/Swiften/FileTransfer/UnitTest/OutgoingJingleFileTransferTest.cpp b/Swiften/FileTransfer/UnitTest/OutgoingJingleFileTransferTest.cpp
index 4b2fb50..f3fe42e 100644
--- a/Swiften/FileTransfer/UnitTest/OutgoingJingleFileTransferTest.cpp
+++ b/Swiften/FileTransfer/UnitTest/OutgoingJingleFileTransferTest.cpp
@@ -135,11 +135,11 @@ public:
 
 		void tearDown() {
 			delete ftTransportFactory;
-			delete networkEnvironment;
-			delete natTraverser;
-			delete bytestreamServerManager;
 			delete s5bProxy;
 			delete idGen;
+			delete bytestreamServerManager;
+			delete natTraverser;
+			delete networkEnvironment;
 			delete s5bRegistry;
 			delete serverConnectionFactory;
 			delete connectionFactory;
-- 
cgit v0.10.2-6-g49f6