Skip to content
This repository has been archived by the owner on Jul 18, 2021. It is now read-only.

Commit

Permalink
Fixed memory leak; Upgraded to latest package versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Lobodinský committed Apr 9, 2016
1 parent 28e1fe6 commit 2d7e965
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.3.1 / 2016-04-09

* Fixed memory leak and upgraded to latest package versions

# 0.3.0 / 2015-09-10

* Rewritten the module by using `Nan` module to eliminate incompatibilities with new V8 versions (preparation for Node.js 4.0)
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "unix-access",
"version": "0.3.0",
"version": "0.3.1",
"description": "Wrapper for access() UNIX C function",
"main": "./index.js",
"scripts": {
Expand All @@ -25,15 +25,15 @@
"url": "https://github.com/lobodpav/node-unix-access/issues?state=open"
},
"engines": {
"node": "~0.12.0"
"node": "~5.10.1"
},
"readmeFilename": "README.md",
"license": "MIT",
"dependencies": {
"nan": "~2.0.9"
"nan": "~2.2.1"
},
"devDependencies": {
"mocha": "~2.2.1",
"should": "~5.2.0"
"mocha": "~2.4.5",
"should": "~8.3.0"
}
}
4 changes: 3 additions & 1 deletion src/async.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class AccessWorker : public AsyncWorker {

public:
AccessWorker(char *path, int amode, Callback *callback) : AsyncWorker(callback), path(path), amode(amode) {}
~AccessWorker() {}
~AccessWorker() {
free(path);
}

// Executed inside the worker-thread
// It is not safe to access V8, or V8 data structures here, so everything we need for input and output should go on `this`
Expand Down

0 comments on commit 2d7e965

Please sign in to comment.