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:
92023b4
)
crypto: fix return Local Handle w/o scope.Close()
author
Trevor Norris
<trev.norris@gmail.com>
Wed, 17 Apr 2013 18:45:13 +0000
(11:45 -0700)
committer
Ben Noordhuis
<info@bnoordhuis.nl>
Wed, 17 Apr 2013 23:30:36 +0000
(
01:30
+0200)
A new String was being created and returned, but was not sent through
the scope.Close(), which caused it to be cleaned up before being
returned.
src/node_crypto.cc
patch
|
blob
|
history
diff --git
a/src/node_crypto.cc
b/src/node_crypto.cc
index
4a02812
..
667f1e3
100644
(file)
--- a/
src/node_crypto.cc
+++ b/
src/node_crypto.cc
@@
-1962,7
+1962,8
@@
Handle<Value> Connection::GetNegotiatedProto(const Arguments& args) {
return False();
}
- return String::New((const char*) npn_proto, npn_proto_len);
+ return scope.Close(String::New(reinterpret_cast<const char*>(npn_proto),
+ npn_proto_len));
} else {
return ss->selectedNPNProto_;
}