unix: fix stray pointer free() when HAVE_FUTIMES=0
uv_fs_futime() failed to initialize req.path when HAVE_FUTIMES=0. uv_fs_req_cleanup() later on tried to free the bogus pointer.
This commit is contained in:
parent
1b9d00fb42
commit
92c9e95721
@ -518,11 +518,11 @@ static int _futime(const uv_file file, double atime, double mtime) {
|
||||
|
||||
int uv_fs_futime(uv_loop_t* loop, uv_fs_t* req, uv_file file, double atime,
|
||||
double mtime, uv_fs_cb cb) {
|
||||
#if HAVE_FUTIMES
|
||||
const char* path = NULL;
|
||||
|
||||
uv_fs_req_init(loop, req, UV_FS_FUTIME, path, cb);
|
||||
|
||||
#if HAVE_FUTIMES
|
||||
WRAP_EIO(UV_FS_FUTIME, eio_futime, _futime, ARGS3(file, atime, mtime))
|
||||
#else
|
||||
uv__set_sys_error(loop, ENOSYS);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user