summaryrefslogtreecommitdiff
path: root/lib/http.js
diff options
context:
space:
mode:
authorhc <hheennrryy@gmail.com>2013-03-08 06:07:27 -0500
committerisaacs <i@izs.me>2013-03-09 08:46:44 -0800
commit5757ce48b41eaa0bfff89b3b9bc6f8f4ebbfeb53 (patch)
tree3d192b74186577e82f3ca94e6f967bbb96492388 /lib/http.js
parent7becf156a92180c9b6455f60b143e18729592dfb (diff)
downloadandroid-node-v8-5757ce48b41eaa0bfff89b3b9bc6f8f4ebbfeb53.tar.gz
android-node-v8-5757ce48b41eaa0bfff89b3b9bc6f8f4ebbfeb53.tar.bz2
android-node-v8-5757ce48b41eaa0bfff89b3b9bc6f8f4ebbfeb53.zip
http: check if incoming parser has already been freed
Fix #4948 This adds a check before setting the incoming parser to null. Under certain circumstances it'll already be set to null by freeParser(). Otherwise this will cause node to crash as it tries to set null on something that is already null.
Diffstat (limited to 'lib/http.js')
-rw-r--r--lib/http.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/http.js b/lib/http.js
index aafbe5f60f..1f52d31514 100644
--- a/lib/http.js
+++ b/lib/http.js
@@ -420,7 +420,7 @@ IncomingMessage.prototype._dump = function() {
return;
this._dumped = true;
- this.socket.parser.incoming = null;
+ if (this.socket.parser) this.socket.parser.incoming = null;
this.push(null);
readStart(this.socket);
};