diff --git a/src/node_file.cc b/src/node_file.cc index 19ddb0e67bdf..128906432330 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -172,10 +172,10 @@ static Handle Stat(const Arguments& args) { if (args[1]->IsFunction()) { ASYNC_CALL(stat, args[1], *path) } else { - struct stat *s; - int ret = stat(*path, s); + struct stat s; + int ret = stat(*path, &s); if (ret != 0) return ThrowException(errno_exception(errno)); - return scope.Close(BuildStatsObject(s)); + return scope.Close(BuildStatsObject(&s)); } }