node/test/parallel/test-zlib-destroy.js
Mathias Buus b07cb4810c
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>
2018-10-24 16:10:16 +02:00

13 lines
270 B
JavaScript

'use strict';
require('../common');
const assert = require('assert');
const zlib = require('zlib');
// verify that the zlib transform does clean up
// the handle when calling destroy.
const ts = zlib.createGzip();
ts.destroy();
assert.strictEqual(ts._handle, null);