Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
unix: fix stray pointer free() when HAVE_FUTIMES=0
Browse files Browse the repository at this point in the history
uv_fs_futime() failed to initialize req.path when HAVE_FUTIMES=0.
uv_fs_req_cleanup() later on tried to free the bogus pointer.
  • Loading branch information
bnoordhuis committed Nov 21, 2011
1 parent 1b9d00f commit 92c9e95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unix/fs.c
Expand Up @@ -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);
Expand Down

0 comments on commit 92c9e95

Please sign in to comment.