Skip to content

Commit

Permalink
Merge pull request #57 from amcgoogan/patch-libuv-fs-event-leak
Browse files Browse the repository at this point in the history
Patch for libuv watcher leak
  • Loading branch information
nromito authored Oct 19, 2024
2 parents 720e3db + 6d99f75 commit fc6fafe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/NodeBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ class NodeJsBuilder {
await patchFile(
this.nodePath('src', 'node.cc'),
join(this.patchDir, 'node.cc.patch'));
await patchFile(
this.nodePath('deps', 'uv', 'src', 'win', 'fs-event.c'),
join(this.patchDir, 'fs-event.c.patch'));
}

async patchNodeCompileIssues() {
Expand Down
11 changes: 11 additions & 0 deletions src/patch/18.20.4/fs-event.c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/deps/uv/src/win/fs-event.c
+++ b/deps/uv/src/win/fs-event.c
@@ -266,6 +266,8 @@ short_path_done:
}

dir_to_watch = dir;
+ uv__free(short_path);
+ short_path = NULL;
uv__free(pathw);
pathw = NULL;
}

0 comments on commit fc6fafe

Please sign in to comment.