diff --git a/src/node_file.cc b/src/node_file.cc index f4cda23580..399ec88dd7 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -118,6 +118,10 @@ int EIOPromise::After(eio_req *req) { Local exception = Exception::Error( String::NewSymbol(strerror(req->errorno))); promise->EmitError(1, &exception); + if (req->type == EIO_WRITE) { + assert(req->ptr2); + delete [] req->ptr2; + } return 0; }