From 40d02d4969bb4fd3c0ec8a6268df1b87c6b9e667 Mon Sep 17 00:00:00 2001
From: Tobias Markmann <tm@ayena.de>
Date: Thu, 12 Feb 2015 12:56:53 +0100
Subject: Free ProxyFinder instance after we are done with it

SOCKS5BytestreamProxiesManager will try to stop its ProxyFinder if it
exists in its dtor.

Test-Information:

Running the FileTransferTest crashed before. Now it successfully runs
through on Linux.

Change-Id: I1e95694a5d32728123ddb436274901e4d8643974

diff --git a/Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.cpp b/Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.cpp
index ef0a733..26ad8b5 100644
--- a/Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.cpp
+++ b/Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.cpp
@@ -117,6 +117,7 @@ void SOCKS5BytestreamProxiesManager::handleProxyFound(S5BProxyRequest::ref proxy
 		onDiscoveredProxiesChanged();
 	}
 	proxyFinder_->stop();
+	proxyFinder_.reset();
 }
 
 void SOCKS5BytestreamProxiesManager::handleNameLookupResult(const std::vector<HostAddress>& address, boost::optional<DomainNameResolveError> error, S5BProxyRequest::ref proxy) {
-- 
cgit v0.10.2-6-g49f6