diff options
author | Mathias Buus <mathiasbuus@gmail.com> | 2018-10-18 17:40:57 +0200 |
---|---|---|
committer | Mathias Buus <mathiasbuus@gmail.com> | 2018-10-23 17:59:17 +0200 |
commit | 8a02d941b6c2e053376dd70dd0cca2351903c577 (patch) | |
tree | 38923b8c6203139eb5fa498f9bcc2537f17bc0a4 /test/parallel/test-zlib-close-in-ondata.js | |
parent | d1d5924f1a360f18a6eda06655f7e821335e1eb6 (diff) | |
download | node-new-8a02d941b6c2e053376dd70dd0cca2351903c577.tar.gz |
zlib: do not leak on destroy
PR-URL: https://github.com/nodejs/node/pull/23734
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'test/parallel/test-zlib-close-in-ondata.js')
-rw-r--r-- | test/parallel/test-zlib-close-in-ondata.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/parallel/test-zlib-close-in-ondata.js b/test/parallel/test-zlib-close-in-ondata.js new file mode 100644 index 0000000000..44d996311d --- /dev/null +++ b/test/parallel/test-zlib-close-in-ondata.js @@ -0,0 +1,10 @@ +'use strict'; + +const common = require('../common'); +const zlib = require('zlib'); + +const ts = zlib.createGzip(); +const buf = Buffer.alloc(1024 * 1024 * 20); + +ts.on('data', common.mustCall(() => ts.close())); +ts.end(buf); |