Skip to content

Commit

Permalink
Merge pull request #4080
Browse files Browse the repository at this point in the history
dead780 abstract_tcp_server2: fix use after free (moneromooo-monero)
  • Loading branch information
fluffypony committed Jul 3, 2018
2 parents d1f1026 + dead780 commit c58758a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/epee/include/net/abstract_tcp_server2.inl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
//---------------------------------------------------------------------------------
Expand Down

0 comments on commit c58758a

Please sign in to comment.