diff options
| author | Tobias Markmann <tm@ayena.de> | 2015-06-19 12:45:31 (GMT) |
|---|---|---|
| committer | Kevin Smith <kevin.smith@isode.com> | 2015-07-08 07:08:08 (GMT) |
| commit | a2b065eb22755f9341c58096805875021faffa67 (patch) | |
| tree | 0283b12cc160260e5b1c04d377dbab6ebef7fe36 /Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp | |
| parent | 07544ee46ffda935714dfc36e5bc5582a7d8c2b0 (diff) | |
| download | swift-a2b065eb22755f9341c58096805875021faffa67.zip swift-a2b065eb22755f9341c58096805875021faffa67.tar.bz2 | |
Stop timer when SOCKS5BytestreamClientSession is deleted
ASAN reported heap-use-after-free because if the timer is running
and an instance is freed, the signal of the timer is still emitted and
connected slots are called.
Test-Information:
Tested that the ASAN report wents away with this fix.
Change-Id: Id785737c4c015e5c638e9d9f6419d740d6cf83b9
Diffstat (limited to 'Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp')
| -rw-r--r-- | Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp b/Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp index 4a0cd67..04d5d86 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp +++ b/Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp | |||
| @@ -16,13 +16,13 @@ | |||
| 16 | #include <boost/numeric/conversion/cast.hpp> | 16 | #include <boost/numeric/conversion/cast.hpp> |
| 17 | 17 | ||
| 18 | #include <Swiften/Base/Algorithm.h> | 18 | #include <Swiften/Base/Algorithm.h> |
| 19 | #include <Swiften/Base/SafeByteArray.h> | 19 | #include <Swiften/Base/ByteArray.h> |
| 20 | #include <Swiften/Base/Concat.h> | 20 | #include <Swiften/Base/Concat.h> |
| 21 | #include <Swiften/Base/Log.h> | 21 | #include <Swiften/Base/Log.h> |
| 22 | #include <Swiften/StringCodecs/Hexify.h> | 22 | #include <Swiften/Base/SafeByteArray.h> |
| 23 | #include <Swiften/FileTransfer/BytestreamException.h> | 23 | #include <Swiften/FileTransfer/BytestreamException.h> |
| 24 | #include <Swiften/Network/TimerFactory.h> | 24 | #include <Swiften/Network/TimerFactory.h> |
| 25 | #include <Swiften/Base/ByteArray.h> | 25 | #include <Swiften/StringCodecs/Hexify.h> |
| 26 | 26 | ||
| 27 | namespace Swift { | 27 | namespace Swift { |
| 28 | 28 | ||
| @@ -42,6 +42,7 @@ SOCKS5BytestreamClientSession::SOCKS5BytestreamClientSession( | |||
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | SOCKS5BytestreamClientSession::~SOCKS5BytestreamClientSession() { | 44 | SOCKS5BytestreamClientSession::~SOCKS5BytestreamClientSession() { |
| 45 | weFailedTimeout->stop(); | ||
| 45 | } | 46 | } |
| 46 | 47 | ||
| 47 | void SOCKS5BytestreamClientSession::start() { | 48 | void SOCKS5BytestreamClientSession::start() { |
Swift