From 92c9e95721af756fb1237986459a9730652d91c7 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 21 Nov 2011 23:55:17 +0100 Subject: [PATCH] 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. --- src/unix/fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/fs.c b/src/unix/fs.c index 57664c83..2ce38f14 100644 --- a/src/unix/fs.c +++ b/src/unix/fs.c @@ -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);