aix: fix un-initialized pointer field in fs handle
On AIX, uv_fs_event_start() didn't always initialize handle->dir_filename. In this scenario, uv_fs_event_stop() would free the uninitialized pointer. This commit initialized handle->dir_filename to NULL in all cases. Fixes: https://github.com/nodejs/node/issues/13577 PR-URL: https://github.com/libuv/libuv/pull/1400 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
parent
4987b6325b
commit
09444560fe
@ -855,6 +855,7 @@ int uv_fs_event_start(uv_fs_event_t* handle,
|
||||
uv__io_init(&handle->event_watcher, uv__ahafs_event, fd);
|
||||
handle->path = uv__strdup(filename);
|
||||
handle->cb = cb;
|
||||
handle->dir_filename = NULL;
|
||||
|
||||
uv__io_start(handle->loop, &handle->event_watcher, POLLIN);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user