diff options
| author | Tobias Markmann <tm@ayena.de> | 2015-10-06 07:30:56 (GMT) |
|---|---|---|
| committer | Tobias Markmann <tm@ayena.de> | 2015-10-14 14:35:55 (GMT) |
| commit | b00c84574fc730eeeabb57df1f17b54855218193 (patch) | |
| tree | bbc05725a01a12b832065beb9f5eb20d71cb3178 /Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp | |
| parent | a30c7ad74fc830dbd10b9560054f39063b5e8372 (diff) | |
| download | swift-b00c84574fc730eeeabb57df1f17b54855218193.zip swift-b00c84574fc730eeeabb57df1f17b54855218193.tar.bz2 | |
Fix memory leak warnings by Valgrind/LSAN
Test-Information:
Both Valgrind and clang's leak sanitizer report a lot leaks
on the FileTransferTest. With this commit it the stack traces
related to the fixed leaks are gone.
Change-Id: Idae9a81bcd8d97576d3f1469bf64490e0bfa7d55
Diffstat (limited to 'Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp')
| -rw-r--r-- | Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp b/Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp index 04d5d86..a38501b 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp +++ b/Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp | |||
| @@ -40,10 +40,12 @@ SOCKS5BytestreamClientSession::SOCKS5BytestreamClientSession( | |||
| 40 | weFailedTimeout->onTick.connect( | 40 | weFailedTimeout->onTick.connect( |
| 41 | boost::bind(&SOCKS5BytestreamClientSession::handleWeFailedTimeout, this)); | 41 | boost::bind(&SOCKS5BytestreamClientSession::handleWeFailedTimeout, this)); |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | SOCKS5BytestreamClientSession::~SOCKS5BytestreamClientSession() { | 44 | SOCKS5BytestreamClientSession::~SOCKS5BytestreamClientSession() { |
| 45 | weFailedTimeout->onTick.disconnect( | ||
| 46 | boost::bind(&SOCKS5BytestreamClientSession::handleWeFailedTimeout, this)); | ||
| 45 | weFailedTimeout->stop(); | 47 | weFailedTimeout->stop(); |
| 46 | } | 48 | } |
| 47 | 49 | ||
| 48 | void SOCKS5BytestreamClientSession::start() { | 50 | void SOCKS5BytestreamClientSession::start() { |
| 49 | assert(state == Initial); | 51 | assert(state == Initial); |
Swift