Skip to content
Browse files

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.
  • Loading branch information...
1 parent 113c371 commit 5e93d6f25a59f07b804344ae95bd458fb8022a0c @tomhughes tomhughes committed Feb 24, 2013
Showing with 0 additions and 2 deletions.
  1. +0 −1 src/async.h
  2. +0 −1 src/statement.cc
View
1 src/async.h
@@ -50,7 +50,6 @@ template <class Item, class Parent> class Async {
assert(handle->data != NULL);
Async* async = static_cast<Async*>(handle->data);
delete async;
- handle->data = NULL;
}
void finish() {
View
1 src/statement.cc
@@ -647,7 +647,6 @@ void Statement::CloseCallback(uv_handle_t* handle) {
assert(handle->data != NULL);
Async* async = static_cast<Async*>(handle->data);
delete async;
- handle->data = NULL;
}
void Statement::AsyncEach(uv_async_t* handle, int status) {

0 comments on commit 5e93d6f

Please sign in to comment.
Something went wrong with that request. Please try again.