mirror of
https://github.com/boostorg/asio.git
synced 2026-01-27 06:32:08 +00:00
Reapply double delete fix, which was overwritten by Networking TS merge.
This commit is contained in:
@@ -385,6 +385,15 @@ void epoll_reactor::deregister_descriptor(socket_type descriptor,
|
||||
reinterpret_cast<uintmax_t>(descriptor_data)));
|
||||
|
||||
scheduler_.post_deferred_completions(ops);
|
||||
|
||||
// Leave descriptor_data set so that it will be freed by the subsequent
|
||||
// call to cleanup_descriptor_data.
|
||||
}
|
||||
else
|
||||
{
|
||||
// We are shutting down, so prevent cleanup_descriptor_data from freeing
|
||||
// the descriptor_data object and let the destructor free it instead.
|
||||
descriptor_data = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -413,6 +422,15 @@ void epoll_reactor::deregister_internal_descriptor(socket_type descriptor,
|
||||
BOOST_ASIO_HANDLER_REACTOR_DEREGISTRATION((
|
||||
context(), static_cast<uintmax_t>(descriptor),
|
||||
reinterpret_cast<uintmax_t>(descriptor_data)));
|
||||
|
||||
// Leave descriptor_data set so that it will be freed by the subsequent
|
||||
// call to cleanup_descriptor_data.
|
||||
}
|
||||
else
|
||||
{
|
||||
// We are shutting down, so prevent cleanup_descriptor_data from freeing
|
||||
// the descriptor_data object and let the destructor free it instead.
|
||||
descriptor_data = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -329,6 +329,15 @@ void kqueue_reactor::deregister_descriptor(socket_type descriptor,
|
||||
reinterpret_cast<uintmax_t>(descriptor_data)));
|
||||
|
||||
scheduler_.post_deferred_completions(ops);
|
||||
|
||||
// Leave descriptor_data set so that it will be freed by the subsequent
|
||||
// call to cleanup_descriptor_data.
|
||||
}
|
||||
else
|
||||
{
|
||||
// We are shutting down, so prevent cleanup_descriptor_data from freeing
|
||||
// the descriptor_data object and let the destructor free it instead.
|
||||
descriptor_data = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -361,6 +370,15 @@ void kqueue_reactor::deregister_internal_descriptor(socket_type descriptor,
|
||||
BOOST_ASIO_HANDLER_REACTOR_DEREGISTRATION((
|
||||
context(), static_cast<uintmax_t>(descriptor),
|
||||
reinterpret_cast<uintmax_t>(descriptor_data)));
|
||||
|
||||
// Leave descriptor_data set so that it will be freed by the subsequent
|
||||
// call to cleanup_descriptor_data.
|
||||
}
|
||||
else
|
||||
{
|
||||
// We are shutting down, so prevent cleanup_descriptor_data from freeing
|
||||
// the descriptor_data object and let the destructor free it instead.
|
||||
descriptor_data = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user