File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,12 +64,14 @@ using v8::Value;
6464class FSReqWrap: public ReqWrap<uv_fs_t> {
6565 public:
6666 explicit FSReqWrap (const char * syscall)
67- : must_free_ (false ),
68- syscall_ (syscall) {
67+ : must_free_ (false )
68+ , data_ (NULL )
69+ , syscall_ (syscall) {
6970 }
7071
7172 const char * syscall () { return syscall_; }
7273 bool must_free_; // request is responsible for free'ing memory oncomplete
74+ char * data_;
7375
7476 private:
7577 const char * syscall_;
@@ -103,7 +105,7 @@ static void After(uv_fs_t *req) {
103105
104106 // check if data needs to be cleaned
105107 if (req_wrap->must_free_ == true )
106- delete[] static_cast < char *>( req_wrap->data_ ) ;
108+ delete[] req_wrap->data_ ;
107109
108110 // there is always at least one argument. "error"
109111 int argc = 1 ;
Original file line number Diff line number Diff line change @@ -74,7 +74,6 @@ class ReqWrap {
7474
7575 v8::Persistent<v8::Object> object_;
7676 QUEUE req_wrap_queue_;
77- void * data_;
7877 T req_; // *must* be last, GetActiveRequests() in node.cc depends on it
7978};
8079
You can’t perform that action at this time.
0 commit comments