diff options
author | isaacs <i@izs.me> | 2012-05-03 10:20:20 -0700 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-05-04 14:27:47 -0700 |
commit | e4dd8dc28efc8bbf8e2adb3d9ce17229db46219b (patch) | |
tree | d68c5754c1f3992417a0c0174d700e79f35070ea /lib | |
parent | 5eac8d6739cda9a07d75528a17b115b225b196e8 (diff) | |
download | android-node-v8-e4dd8dc28efc8bbf8e2adb3d9ce17229db46219b.tar.gz android-node-v8-e4dd8dc28efc8bbf8e2adb3d9ce17229db46219b.tar.bz2 android-node-v8-e4dd8dc28efc8bbf8e2adb3d9ce17229db46219b.zip |
http leak: Null links from parser to req/res
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/http.js b/lib/http.js index 7e51ec5758..30285eec63 100644 --- a/lib/http.js +++ b/lib/http.js @@ -1198,6 +1198,7 @@ function ClientRequest(options, cb) { self._deferToConnect(null, null, function() { self._flush(); + self = null; }); } @@ -1255,12 +1256,17 @@ ClientRequest.prototype.onSocket = function(socket) { var freeParser = function() { if (parser) { - parsers.free(parser); + parser.onIncoming = null; parser.socket.onend = null; parser.socket.ondata = null; parser.socket = null; + parser.incoming = null; + parsers.free(parser); parser = null; } + if (req) { + req.parser = null; + } }; var errorListener = function(err) { |