File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -64,12 +64,14 @@ using v8::Value;
64
64
class FSReqWrap: public ReqWrap<uv_fs_t> {
65
65
public:
66
66
explicit FSReqWrap (const char * syscall )
67
- : must_free_ (false ),
68
- syscall_ (syscall ) {
67
+ : must_free_ (false )
68
+ , data_ (NULL )
69
+ , syscall_ (syscall ) {
69
70
}
70
71
71
72
const char * syscall () { return syscall_; }
72
73
bool must_free_; // request is responsible for free'ing memory oncomplete
74
+ char * data_;
73
75
74
76
private:
75
77
const char * syscall_;
@@ -103,7 +105,7 @@ static void After(uv_fs_t *req) {
103
105
104
106
// check if data needs to be cleaned
105
107
if (req_wrap->must_free_ == true )
106
- delete[] static_cast < char *>( req_wrap->data_ ) ;
108
+ delete[] req_wrap->data_ ;
107
109
108
110
// there is always at least one argument. "error"
109
111
int argc = 1 ;
Original file line number Diff line number Diff line change @@ -74,7 +74,6 @@ class ReqWrap {
74
74
75
75
v8::Persistent<v8::Object> object_;
76
76
QUEUE req_wrap_queue_;
77
- void * data_;
78
77
T req_; // *must* be last, GetActiveRequests() in node.cc depends on it
79
78
};
80
79
You can’t perform that action at this time.
0 commit comments