projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
19641b1
)
src: fix minor memleak in preload-modules
author
Ali Ijaz Sheikh
<ofrobots@google.com>
Wed, 25 Mar 2015 19:19:46 +0000
(12:19 -0700)
committer
Ben Noordhuis
<info@bnoordhuis.nl>
Sat, 28 Mar 2015 11:43:18 +0000
(12:43 +0100)
Free the preload_modules array once we are done with it.
PR-URL: https://github.com/iojs/io.js/pull/1265
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
src/node.cc
patch
|
blob
|
history
diff --git
a/src/node.cc
b/src/node.cc
index
e82ea37
..
02df0d8
100644
(file)
--- a/
src/node.cc
+++ b/
src/node.cc
@@
-2761,6
+2761,10
@@
void SetupProcessObject(Environment* env,
READONLY_PROPERTY(process,
"_preload_modules",
array);
+
+ delete[] preload_modules;
+ preload_modules = nullptr;
+ preload_module_count = 0;
}
// --no-deprecation