summaryrefslogtreecommitdiff
path: root/test/parallel/test-zlib.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-zlib.js')
-rw-r--r--test/parallel/test-zlib.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-zlib.js b/test/parallel/test-zlib.js
index 1256d94a61..261b519a6b 100644
--- a/test/parallel/test-zlib.js
+++ b/test/parallel/test-zlib.js
@@ -73,7 +73,7 @@ BufferStream.prototype.write = function(c) {
BufferStream.prototype.end = function(c) {
if (c) this.write(c);
// flatten
- var buf = new Buffer(this.length);
+ var buf = Buffer.allocUnsafe(this.length);
var i = 0;
this.chunks.forEach(function(c) {
c.copy(buf, i);