http leak: Null links from parser to req/res
This commit is contained in:
parent
5eac8d6739
commit
e4dd8dc28e
@ -1198,6 +1198,7 @@ function ClientRequest(options, cb) {
|
|||||||
|
|
||||||
self._deferToConnect(null, null, function() {
|
self._deferToConnect(null, null, function() {
|
||||||
self._flush();
|
self._flush();
|
||||||
|
self = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1255,12 +1256,17 @@ ClientRequest.prototype.onSocket = function(socket) {
|
|||||||
|
|
||||||
var freeParser = function() {
|
var freeParser = function() {
|
||||||
if (parser) {
|
if (parser) {
|
||||||
parsers.free(parser);
|
parser.onIncoming = null;
|
||||||
parser.socket.onend = null;
|
parser.socket.onend = null;
|
||||||
parser.socket.ondata = null;
|
parser.socket.ondata = null;
|
||||||
parser.socket = null;
|
parser.socket = null;
|
||||||
|
parser.incoming = null;
|
||||||
|
parsers.free(parser);
|
||||||
parser = null;
|
parser = null;
|
||||||
}
|
}
|
||||||
|
if (req) {
|
||||||
|
req.parser = null;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var errorListener = function(err) {
|
var errorListener = function(err) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user