Skip to content

windows: fix nil pointer dereference in remWatch#736

Merged
mattn merged 2 commits into
fsnotify:mainfrom
mattn:fix-windows-remwatch-nil
Apr 21, 2026
Merged

windows: fix nil pointer dereference in remWatch#736
mattn merged 2 commits into
fsnotify:mainfrom
mattn:fix-windows-remwatch-nil

Conversation

@mattn

@mattn mattn commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Fix nil pointer dereference in remWatch when called on a non-watched path with the \... recurse suffix. The nil check ran after watch.recurse was dereferenced; reorder the check and close the handle in the early-return paths. Includes a regression test.

@shogo82148 shogo82148 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mattn

mattn commented Apr 21, 2026

Copy link
Copy Markdown
Contributor Author

macos-13 is already closing down. So merge without tests for macros-13

https://github.blog/changelog/2025-09-19-github-actions-macos-13-runner-image-is-closing-down/

@mattn mattn merged commit 1a54fc3 into fsnotify:main Apr 21, 2026
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants