File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -787,7 +787,7 @@ class FdEntry final : public EntryImpl {
787
787
public:
788
788
static std::unique_ptr<FdEntry> Create (Environment* env, Local<Value> path) {
789
789
// We're only going to create the FdEntry if the file exists.
790
- uv_fs_t req;
790
+ uv_fs_t req = uv_fs_t () ;
791
791
auto cleanup = OnScopeLeave ([&] { uv_fs_req_cleanup (&req); });
792
792
793
793
auto buf = std::make_shared<BufferValue>(env->isolate (), path);
@@ -849,7 +849,7 @@ class FdEntry final : public EntryImpl {
849
849
}
850
850
851
851
static bool CheckModified (FdEntry* entry, int fd) {
852
- uv_fs_t req;
852
+ uv_fs_t req = uv_fs_t () ;
853
853
auto cleanup = OnScopeLeave ([&] { uv_fs_req_cleanup (&req); });
854
854
// TODO(jasnell): Note the use of a sync fs call here is a bit unfortunate.
855
855
// Doing this asynchronously creates a bit of a race condition tho, a file
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ int RunNodeInstance(MultiIsolatePlatform* platform,
75
75
if (snapshot_as_file_it != args.end ()) {
76
76
snapshot = node::EmbedderSnapshotData::FromFile (fp);
77
77
} else {
78
- uv_fs_t req;
78
+ uv_fs_t req = uv_fs_t () ;
79
79
int statret = uv_fs_stat (nullptr , &req, filename, nullptr );
80
80
assert (statret == 0 );
81
81
size_t filesize = req.statbuf .st_size ;
You can’t perform that action at this time.
0 commit comments