diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-06-29 15:40:19 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-06-29 15:40:48 +0100 |
commit | dead780f8a3f384a57be29747b570b94ff6eabb5 (patch) | |
tree | 02576d1cf4bdf8de6386d87ca060d62f8437511b /contrib/epee/include/net/abstract_tcp_server2.inl | |
parent | Merge pull request #4067 (diff) | |
download | monero-dead780f8a3f384a57be29747b570b94ff6eabb5.tar.xz |
abstract_tcp_server2: fix use after free
Diffstat (limited to 'contrib/epee/include/net/abstract_tcp_server2.inl')
-rw-r--r-- | contrib/epee/include/net/abstract_tcp_server2.inl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/epee/include/net/abstract_tcp_server2.inl b/contrib/epee/include/net/abstract_tcp_server2.inl index 134bb4199..5f1f35280 100644 --- a/contrib/epee/include/net/abstract_tcp_server2.inl +++ b/contrib/epee/include/net/abstract_tcp_server2.inl @@ -653,13 +653,13 @@ PRAGMA_WARNING_DISABLE_VS(4355) m_timer.cancel(); boost::system::error_code ignored_ec; socket_.shutdown(boost::asio::ip::tcp::socket::shutdown_both, ignored_ec); - m_was_shutdown = true; - m_protocol_handler.release_protocol(); if (!m_host.empty()) { try { host_count(m_host, -1); } catch (...) { /* ignore */ } m_host = ""; } + m_was_shutdown = true; + m_protocol_handler.release_protocol(); return true; } //--------------------------------------------------------------------------------- |