Commit 5e93d6f2 by Tom Hughes

Don't write to Async objects after we've deleted them

The handle here is actually the uv_async_t object named watcher that
is part of the Async object so we shouldn't try and write to it after
the Async object has been freed.
parent 113c3719
...@@ -50,7 +50,6 @@ public: ...@@ -50,7 +50,6 @@ public:
assert(handle->data != NULL); assert(handle->data != NULL);
Async* async = static_cast<Async*>(handle->data); Async* async = static_cast<Async*>(handle->data);
delete async; delete async;
handle->data = NULL;
} }
void finish() { void finish() {
......
...@@ -647,7 +647,6 @@ void Statement::CloseCallback(uv_handle_t* handle) { ...@@ -647,7 +647,6 @@ void Statement::CloseCallback(uv_handle_t* handle) {
assert(handle->data != NULL); assert(handle->data != NULL);
Async* async = static_cast<Async*>(handle->data); Async* async = static_cast<Async*>(handle->data);
delete async; delete async;
handle->data = NULL;
} }
void Statement::AsyncEach(uv_async_t* handle, int status) { void Statement::AsyncEach(uv_async_t* handle, int status) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment